You are here: Re: Illegal string offset error in array « PHP « IT news, forums, messages
Re: Illegal string offset error in array

Posted by Jasper Bryant-Greene on 03/28/05 01:23

Johannes Findeisen wrote:
> Hello all,
>
> sorry if this has been asked allready but i didn't find any usefull
> information in the web.
>
> Why is this function not working in PHP5?
> [snip]
>
> /*
> * This line does not work in PHP5 cause off an
> illegal string offset in an array ERROR
> */
> $arrAvailableContent[$i]['submenu'][$n]['file'] =
> $subfile;
> [snip]
> Can someone help?

You can't access string offsets with square brackets [] in PHP5. You
need to use curly braces {} instead.

Square brackets [] for arrays, curly braces {} for string offsets.

--
Jasper Bryant-Greene
Cabbage Promotions
www: www.cabbage.co.nz
email: jasper@cabbage.co.nz
phone: 021 232 3303

public key: Jasper Bryant-Greene <jasper@cabbage.co.nz> keyID 0E6CDFC5
fingerprint: 2313 5641 F8F6 5606 8844 49C0 1D6B 2924 0E6C DFC5

 

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

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