Matching irregular cases
| From: | jalist | Date: | Wed, 17 Jan 2001 15:47:26 +0000 |
| Subject: | Matching irregular cases | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-35055@lists.php.net to get a copy of this message | ||
I think this'll be an easy one for you fellas...
I'm writing a search function for my site. The code to search the mysql db's
are in place and working but here's the problem. For any matches that are
displayed, I want to change the search query so it stands out in the result
list. I'm just using...
ereg_replace($search_query, "<b>$search_query</b>", $row[6]);
...at the moment, but it wont match results where the case doesn't match.
Ie if the search query is "blah", the mysql search will return both "blah"
and "Blah" but the ereg_replace will only add the <b> tag to the "blah"
result, not the "Blah" one.
Thanks in advance.
Steve