[PHP] Array_search wildcard

2003-03-21 Thread Liam Gibbs
Is there such a thing as an array_search wildcard? Say I want to find anything beginning with RE and having zero or more characters following it, how would I do that?

Re: [PHP] Array_search wildcard

2003-03-21 Thread Marek Kilimajer
$found=array(); foreach($array as $key = $value) { if(ereg('RE.+',$value)) { // optionaly use eregi for case insensitiveness $found[$key]=$value; } } Liam Gibbs wrote: Is there such a thing as an array_search wildcard? Say I want to find anything beginning with RE and having zero

Re: [PHP] Array_search wildcard

2003-03-21 Thread Liam Gibbs
$found=array(); foreach($array as $key = $value) { if(ereg('RE.+',$value)) { // optionaly use eregi for case insensitiveness $found[$key]=$value; } } Thanks, Marek. With some minor adjustments, this worked out fine! -- PHP General Mailing List (http://www.php.net/) To