|
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]
|