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

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to