note 89885 deleted from function.array-search by levim
| From: | levim@php.net | Date: | Mon, 24 Feb 2014 22:43:25 +0000 |
| Subject: | note 89885 deleted from function.array-search by levim | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-198692@lists.php.net to get a copy of this message | ||
Note Submitter: elie at najberg dot fr
----
This is how to search a part of a val in an array :
<?php
function array_ereg_search($val, $array) {
$i = 0;
$return = array();
foreach($array as $v) {
if(eregi($val, $v)) $return[] = $i;
$i++;
}
return $return;
}
?>