Re: EZ array problem - What's wrong with my brain?
| From: | Martin Alterisio | Date: | Mon, 04 Dec 2006 16:02:35 +0000 |
| Subject: | Re: EZ array problem - What's wrong with my brain? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-245492@lists.php.net to get a copy of this message | ||
2006/11/30, Brian Dunning <brian@briandunning.com>:
var_dump() gives me this:
array(1) {
["1.2"]=>
array(2) {
["code"]=>
array(1) {
[0]=>
string(3) "111"
}
["status"]=>
array(1) {
[0]=>
string(3) "new"
}
}
}
I'm trying to set a variable to that "1.2". Shouldn't I be able to
get it with $var = $arr[0][0]?
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
$keys = array_keys($var);
var_dump($keys[0]);
string(3) "1.2"
$values = array_values($var);
var_dump($values[0]);
array(2) {
["code"]=>
array(1) {
[0]=>
string(3) "111"
}
["status"]=>
array(1) {
[0]=>
string(3) "new"
}
}