You are here: Re: Query returning array « PHP Programming Language « IT news, forums, messages
Re: Query returning array

Posted by Karl Groves on 04/20/07 11:28

Toby A Inkster <usenet200703@tobyinkster.co.uk> wrote in news:nfdmf4-
hco.ln1@ophelia.g5n.co.uk:

> Karl Groves wrote:
>
>> But what I get is instead a multidimensional array.
>> Doing a var_dump on $foo turns out to be
>> array(2) {
>> ["foo"]=>
>> string(5) "Stuff"
>> ["bar"]=>
>> string(10) "More Stuff"
>> }
>
> Umm... that isn't a multidimensional array. Translation follows:
>
> array(2) { // Start of array with 2 elements
> ["foo"]=> // Element with key "foo" is ...
> string(5) "Stuff" // ... a 5 character string "Stuff"
> ["bar"]=> // Element with key "bar" is ...
> string(10) "More Stuff" // ... a 10 character string "More Stuff"
> } // End of array.
>
> A multidimensional array would look more like this:
>
> array(1) {
> [0]=>
> array(2) {
> ["foo"]=>
> string(5) "Stuff"
> ["bar"]=>
> string(10) "More Stuff"
> }
> }
>

Very very sorry that my original post is unclear.

Yes, I am getting a multidimensional array. My var_dump looks exactly
like your second example. (and I wish it looked like the first, lol)

--
Karl Groves

 

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

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