Re: Colon(ectomy)
| From: | Reuben D Budiardja | Date: | Mon, 20 Nov 2000 06:24:45 +0000 |
| Subject: | Re: Colon(ectomy) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-26200@lists.php.net to get a copy of this message | ||
I think this is because you can't initialize a variable when you declare it (as a class variable). I kind of remember I read this somewhere, but I'm not sure..... somebody correct me if I'm wrong please..
Reuben D. Budiardja
At 12:29 PM 11/20/00 -0800, Dallas Kropka wrote:
This is not urgent, I have fixed the problem, but I don't know why it was having a problem in the first place and now its eating at me...
I had a class, and in the variable declarations, I had this line...
var $xdate = date(ymd) ;
Note the ";"..... well, when I went to use the script, it told me that there was NO COLON. But, when I re-wrote the statement as such...
var $xdate ;
CONSTRUCTOR FUNCTION()
{
$this->xdate = date (ymd) ;
...
...
...
}
It works fine.... Why is this.
thanks,
Dallas K.