[PHP] Re: "Search" code finds ANYTHING

2001-08-15 Thread Raphael Pirker
Hi Hugh, > First, array_search returns an array of keys where the values are > exact matches... while you want to match a substring (I think); Yes, but exact matches are better :)) > Then, it searches through the array again using regular expressions, > and each time it finds something, it over-

[PHP] Re: "Search" code finds ANYTHING

2001-08-15 Thread Hugh Bothwell
"Raphael Pirker" <[EMAIL PROTECTED]> wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... > function search_the_array($array) { > global $search_tmp; > $result = array_search($search_tmp, $array, TRUE); >reset($array); >while (