note 70615 added to function.array-search
| From: | dmitry dot polushkin at gmail dot com | Date: | Sun, 22 Oct 2006 05:03:58 +0000 |
| Subject: | note 70615 added to function.array-search | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-118935@lists.php.net to get a copy of this message | ||
To get the key of the found search value, use:
<?php
$a = array('a', 'b', 'c');
echo array_search(array_search('c', $a), array_keys($a));
?>
----
Server IP: 212.47.220.13
Probable Submitter: 82.131.4.213
----
Manual Page -- http://www.php.net/manual/en/function.array-search.php
Edit -- https://master.php.net/note/edit/70615
Del: integrated -- https://master.php.net/note/delete/70615/integrated
Del: useless -- https://master.php.net/note/delete/70615/useless
Del: bad code -- https://master.php.net/note/delete/70615/bad+code
Del: spam -- https://master.php.net/note/delete/70615/spam
Del: non-english -- https://master.php.net/note/delete/70615/non-english
Del: in docs -- https://master.php.net/note/delete/70615/in+docs
Del: other reasons-- https://master.php.net/note/delete/70615
Reject -- https://master.php.net/note/reject/70615
Search -- https://master.php.net/manage/user-notes.php