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!
Navigation:
[Reply to this message]
|