Re: sytax error, but where?
- From: carlton <carlton@xxxxxxxxxxxxxxxxx>
- Date: Sun, 30 Oct 2005 10:28:43 +0000
Oli Filth wrote:
I added the var to line 44, and now get the errorcarlton said the following on 29/10/2005 22:54:
41 class C_Category{ 42 // var $name = array(); changed to var $catname=""; 43 var $catname = ""; 44 $PictureList[] = new C_PictureList(); 45 } the above code (line numbers added) gives the error message:- Parse error: parse error, unexpected T_VARIABLE, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or '}' in /var/www/html/lc.php on line 44 The class C_PictureList is defined prior to line 41
You need "var $PictureList[]...", or if PHP 5, then public, protected or private.
Parse error: parse error, unexpected '[', expecting ',' or ';' in /var/www/html/lc.php on line 44
line 44 is var $PictureList[] = new C_PictureList(); .
- Follow-Ups:
- Re: sytax error, but where?
- From: Janwillem Borleffs
- Re: sytax error, but where?
- References:
- sytax error, but where?
- From: carlton
- Re: sytax error, but where?
- From: Oli Filth
- sytax error, but where?
- Prev by Date: Trouble with sending multipart Email
- Next by Date: Re: sytax error, but where?
- Previous by thread: Re: sytax error, but where?
- Next by thread: Re: sytax error, but where?
- Index(es):
Relevant Pages
|