note 73300 deleted from function.array-search by danbrown
| From: | danbrown@php.net | Date: | Wed, 29 Apr 2009 12:58:20 +0000 |
| Subject: | note 73300 deleted from function.array-search by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-153978@lists.php.net to get a copy of this message | ||
Note Submitter: rob at robspages dot net
----
php dot net at surfnation dot de's function with a slight mod to correct for axo at axolander
dot de's comments:
<?php
function multiArraySearch($needle, $haystack){
$value = false;
$x = 0;
foreach($haystack as $temp){
$search = array_search($needle, $temp);
if (strlen($search) > 0 && $search >= 0){
$value[0] = $x;
$value[1] = $search;
}
$x++;
}
return $value;
}
?>