Reply to Re: Query returning array

Your name:

Reply:


Posted by Toby A Inkster on 04/20/07 09:24

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"
}
}

--
Toby A Inkster BSc (Hons) ARCS
http://tobyinkster.co.uk/
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!

[Back to original 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

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