note 16693 deleted from function.array-search by jimw
| From: | jimw@php.net | Date: | Fri, 07 Dec 2001 21:54:09 +0000 |
| Subject: | note 16693 deleted from function.array-search by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-22042@lists.php.net to get a copy of this message | ||
If you have an old version, you can use the following function as a substitute for the built-in
array_search in 4.0.6.
function array_search($needle, $haystackA) {
if (in_array ($needle, $haystackA)) {
foreach ($haystackA AS $key => $value) {
if (ereg ($needle, $value)) { return $key; }
}
}
else { return FALSE; }
}