note 101595 deleted from function.array-search by levim
| From: | levim@php.net | Date: | Mon, 24 Feb 2014 22:45:24 +0000 |
| Subject: | note 101595 deleted from function.array-search by levim | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-198658@lists.php.net to get a copy of this message | ||
Note Submitter: user at www dot mp3s dot pl
----
for case insensitive array_search you could use:
<?php
function array_search_i($str,$array){
foreach($array as $key => $value) {
if(stristr($str,$value)) return $key;
}
return false;
}
?>