You are here: Re: sytax error, but where? « All PHP « IT news, forums, messages
Re: sytax error, but where?

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация