note 88376 modified in function.in-array by danbrown
| From: | danbrown@php.net | Date: | Wed, 21 Jan 2009 16:32:45 +0000 |
| Subject: | note 88376 modified in function.in-array by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-149603@lists.php.net to get a copy of this message | ||
function similar to in_array but implements LIKE '<string>%'
<?php
function in_array_like($referencia,$array){
foreach($array as $ref){
if (strstr($referencia,$ref)){
return true;
}
}
return false;
}
?>
--was--
function similar to in_array but implements LIKE '<string>%'
function in_array_like($referencia,$array){
foreach($array as $ref){
if (strstr($referencia,$ref)){
return true;
}
}
return false;
}
http://php.net/manual/en/function.in-array.php