note 15092 added to function.array-search.php
| From: | php-general at lists dot php dot net | Date: | Mon, 27 Aug 2001 22:12:26 +0000 |
| Subject: | note 15092 added to function.array-search.php | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17222@lists.php.net to get a copy of this message | ||
to tell teh difference between not found and elemnt 0 use
if(($index = array_search($array,$search)) !== false) {
...
}
http://www.php.net/manual/en/function.array-search.php