|
Posted by carlton on 10/30/05 12:28
Oli Filth wrote:
> carlton 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.
>
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();
Navigation:
[Reply to this message]
|