Re: sytax error, but where?
- From: carlton <carlton@xxxxxxxxxxxxxxxxx>
- Date: Sun, 30 Oct 2005 10:32:33 +0000
Janwillem Borleffs wrote:
PictureList[] is supposed to be an array of C_PictureList objects, not a member of the C_PictureList class.carlton wrote:
I added the var to line 44, and now get the error Parse error: parse error, unexpected '[', expecting ',' or ';' in /var/www/html/lc.php on line 44
line 44 is var $PictureList[] = new C_PictureList();
You should assign $PictureList in the constructor or with a setter:
class C_Category { var $PictureList = array();
function C_Category() { $this->PictureList[] = new C_PictureList(); } }
JW
.
- 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
- Re: sytax error, but where?
- From: carlton
- Re: sytax error, but where?
- From: Janwillem Borleffs
- sytax error, but where?
- Prev by Date: Re: sytax error, but where?
- Next by Date: Re: Class newbie - why doesn't this work?
- Previous by thread: Re: sytax error, but where?
- Next by thread: Re: sytax error, but where?
- Index(es):
Relevant Pages
|