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-writes all previous values...
> and if there were any matches to begin with, it WILL find them again.
Problem is not the overwriting part.. problem is it doesn't really "search",
it "finds" something instantly, whether it's inside the string or not

> And why is the search-string passed as a global while the
> array is passed by value?!  This makes no sense to me.
I'm searching a number of arrays (3 to be exact) for only one search
string... $array is different all the time while $search_tmp is the same

But thanks a lot for the scripts, I will be trying them out immediately!



PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to