> ...snip of class 2...
>
> class calread{
> var $busydays = array();
>
> function calread($curmonth){
> $this->$busyday[$day] = $ampm;
> }
>
> function getDateHTML($day_in){
> $ret = "<td>$busyday[$day_in]</td>";
> return $ret;
> }
>
> }
> ... end snip of class 2...
>
> Can someone tell me what I'm doing wrong?
Nitpicky syntax issue... You should say $this->busyday, not $this->$busyday.
And in getDateHTML, you need to refer to it as $this->busyday as well.
To explain what's happening, PHP is looking at $this->$busyday and before it
knows what to do with it, it needs to evaluate $busyday. For example, if
$busyday were a variable in the local scope initialized to "funkytown",
$this->$busyday would become $this->funkytown. But since there is no local
variable $busyday, it evaluates to $this->[null], which doesn't make sense,
and is why you get the empty property error.
Jon
--------------------
BYU Unix Users Group
http://uug.byu.edu/
The opinions expressed in this message are the responsibility of their
author. They are not endorsed by BYU, the BYU CS Department or BYU-UUG.
___________________________________________________________________
List Info: http://uug.byu.edu/cgi-bin/mailman/listinfo/uug-list