note 61646 rejected from function.array-keys by betz
| From: | betz@php.net | Date: | Wed, 08 Feb 2006 11:32:01 +0000 |
| Subject: | note 61646 rejected from function.array-keys by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-103303@lists.php.net to get a copy of this message | ||
Note Submitter: altruity at gmail dot com
----
QUESTION: How would you just return the value (string) that you want to access in the array?
Related to comments from above:
devmnky /at\ gmail /dot\ com
"Please note that array_keys() does not work if you're trying to search for values within
multi-dimensional arrays."
For example:
$array = array("color" => array("blue", "red", "green"),
"size" => array("small", "medium",
"large"));
print_r(array_keys($array, "blue"));
will return:
Array {}