You are here: Re: problem with using "$them"? « PHP Language « IT news, forums, messages
Re: problem with using "$them"?

Posted by Marnok.com on 09/17/07 22:14

"macca" <ptmcnally@googlemail.com> wrote in message
news:1190045253.934915.5790@w3g2000hsg.googlegroups.com...
>
>> > Some code I had was working, now it tells me "Cannot use string offset
>> > as an
>> > array"
>
> sounds to me like you are trying to travel through a multidimentional
> array and specifying two keys in one array.
>
> e.g.
>
> if i had an array something like
>
> $array = array (0=>1,
> 1=>2,
> 2=> array ('a'=>1,
> 'b'=>2,
> 'c'=> array ('foo'=>70
> 'bar'=>80,
> 'baz'=>100)
>
> and i said $array[2]['b']['c']['baz'] i would get "Cannot use string
> offset as an array"
>
> when i should have said $array[2]['b']['baz']
>

I don't think it can be this because if I simply change the array name, it
works fine. It is only when it is named "$them" it fails - "$thom" is fine,
etc. I'll check the code though to make sure I'm not doing Something Wierd
which would bring this sort of result.

 

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

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