note 101595 added to function.array-search
| From: | user at www dot mp3s dot pl | Date: | Tue, 28 Dec 2010 21:25:38 +0000 |
| Subject: | note 101595 added to function.array-search | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-175287@lists.php.net to get a copy of this message | ||
for case insensitive array_search you could use:
<?
function array_search_i($str,$array){
foreach($array as $key => $value) {
if(stristr($str,$value)) return $key;
}
return false;
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 89.77.124.224
----
Manual Page -- http://www.php.net/manual/en/function.array-search.php
Edit -- https://master.php.net/note/edit/101595
Del: integrated -- https://master.php.net/note/delete/101595/integrated
Del: useless -- https://master.php.net/note/delete/101595/useless
Del: bad code -- https://master.php.net/note/delete/101595/bad+code
Del: spam -- https://master.php.net/note/delete/101595/spam
Del: non-english -- https://master.php.net/note/delete/101595/non-english
Del: in docs -- https://master.php.net/note/delete/101595/in+docs
Del: other reasons-- https://master.php.net/note/delete/101595
Reject -- https://master.php.net/note/reject/101595
Search -- https://master.php.net/manage/user-notes.php