note 12018 deleted from function.array-search by jimw
| From: | jimw@php.net | Date: | Thu, 25 Oct 2001 23:14:16 +0000 |
| Subject: | note 12018 deleted from function.array-search by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-19443@lists.php.net to get a copy of this message | ||
If you want to be compatible with PHP3, i suggest using this function below:
function findinarray($array,$searchvalue) {
for ($i = 0; $i < count($array); $i++) {
if (stristr($array[$i],$searchvalue)) return $i;
}
return 0;
}
Note: Doesn't work with associative arrays