note 52164 added to function.array-search
| From: | martin dot goldinger at netserver dot ch | Date: | Fri, 22 Apr 2005 18:21:48 +0000 |
| Subject: | note 52164 added to function.array-search | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-88413@lists.php.net to get a copy of this message | ||
Example below will print 1, so the first key found will be returned and not an array with keys.
<?
$ar = array(0 => 'A', 1 => 'B', 2 => 'A', 3 =>
'B');
print array_search ('B', $ar);
?>
----
Manual Page -- http://www.php.net/manual/en/function.array-search.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+52164
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52164&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52164&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52164&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52164&report=yes&reason=useless
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52164&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+52164&report=yes
Search -- http://master.php.net/manage/user-notes.php