|
Posted by Yasir Malik on 06/18/05 20:35
> As for now I have:
> if (array_search('5a', $emsg) OR array_search('5b', $emsg)){
> ...
>
> that statement will get very long till z :-)
>
> Any ideas how to make something like this:
> array_search('5*', $emsg)
>
How about something like:
search($emsg)
{
for($i = 0; $i < count($emsg); $i++)
if(preg_match('/5[a-z]/', $emsg[$i]))
return $i;
return -1;
}
Regards,
Yasir
Navigation:
[Reply to this message]
|