Sagewire Logo

problem with using "$them"?

5 Message(s) by 3 Author(s) originally posted in php language


From: ZeldorBlat Date:   Monday, September 17, 2007
On Sep 17, 10:32 am, "Marnok.com" <wizardha...@xxxxxxxxxxx>
wrote in message:
I can not find it, but is $them reserved?
Some code I had was working, now it tells me "Cannot use string offset as an
array ", but only when I try to access an array called $them
(I have $they, $their, etc whcih work fine)
I'll just change the names of the arrays, but I wondered for future
reference, as gooling rvealed nothing to me.
Thanks



It's not reserved. Can you post the code that does not work?


From: Marnok.com Date:   Monday, September 17, 2007
I can not find it, but is $them reserved?

Some code I had was working, now it tells me "Cannot use string offset as an
array", but only when I try to access an array called $them

(I have $they, $their, etc whcih work fine)

I'll just change the names of the arrays, but I wondered for future
reference, as gooling rvealed nothing to me.

Thanks


From: macca Date:   Monday, September 17, 2007
> 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']


From: Marnok.com Date:   Monday, September 17, 2007
On Sep 17, 10:32 am, "Marnok.com" <wizardha...@xxxxxxxxxxx>
wrote in message:
I can not find it, but is $them reserved?

Some code I had was working, now it tells me "Cannot use string offset as
an
array", but only when I try to access an array called $them

(I have $they, $their, etc whcih work fine)

I'll just change the names of the arrays, but I wondered for future
reference, as gooling rvealed nothing to me.

Thanks
It's not reserved. Can you post the code that does not work?



I will try and make a simplified version which just does the not-working bit
and post it later, thanks. (the whole code is way too big to post and won't
make sense out of context...)


From: Marnok.com Date:   Monday, September 17, 2007
> 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 do not 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 will check the code though to make sure I'm not doing Something Wierd
which'd bring this sort of result.



Next Message: How can I convert media (mpeg,mp3 etc) files in to swf by php programming?


Blogs related to problem with using "$them"?

Re: PHP Security Vulnerability???
It says that >>>> states: >>>>>> The remote web server contains a PHP application that is affected by >>>>>> multiple vulnerabilities. >>>>>> >>>>>> I am not using PHP. Has anyone else seen this? ...

hi all i have mysql 5027 running on a hosted FC5 web server for ...
hey, im stuck using mysql 3.23.x, and when i enter stuff like £ into a test field, and then attempt to echo it out in php later on, i just get a little square… is this a php or mysql problem? and does anyone know how to solve it (i ...

Im installing a PHP application which requires the execution of a ...
Also, the one with joins says "Using temporary; Using filesort" while the subquery does not. how large is sha? for a char? is it at all possible. to select all distinct words from a column in a table and store them in a php array lol ...

Im having a little strange problem with a shout box from vbulletin ...
while Microsoft's been using them in the xbox's for years and IBM still makes mid-high end servers based on power5/6 cpus. psyko_x save it to the desktop and open it with ie or ff. again, if I use "http://localhost/test.php" I get a ...

Urban Cup Holder
The aim of the urban cup holder is to encourage people to reinterpret street settings and claim them as their territory, instead of just using them as a means of passage from A to B. The cup holder is easily clamped with one hand to ...

hi ive installed a server apache on my linux distro added php but ...
using require_once, and it's the same, and the error it's because i use a var which is declared on the file that is require. Celos`: Put an echo in file.php, if you see the echo ok then it's being required ok and the problem is ...


Programming | Sports | Autos

copyright 2006
Valid XHTML 1.0 Transitional