note 61646 added to function.array-keys
| From: | altruity at gmail dot com | Date: | Wed, 08 Feb 2006 11:24:19 +0000 |
| Subject: | note 61646 added to function.array-keys | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-103301@lists.php.net to get a copy of this message | ||
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 {}
----
Server IP: 85.111.4.6
Probable Submitter: 85.106.161.225
----
Manual Page -- http://www.php.net/manual/en/function.array-keys.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+61646
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+61646&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+61646&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+61646&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+61646&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+61646&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+61646&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+61646&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+61646&report=yes
Search -- http://master.php.net/manage/user-notes.php