Re: Searching/keywords
| From: | Jason G. | Date: | Fri, 21 Sep 2001 00:05:12 +0000 |
| Subject: | Re: Searching/keywords | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-12628@lists.php.net to get a copy of this message | ||
Just an idea...
You could do a str_replace(), replacing " max " with
<span style="background-color: yellow"> max </span>
You may need to use a reg-exp replace function to determine where actual words are like max, vs. substrings like maximus.
see http://www.php.net/manual/en/function.str-replace.php for more info...
-Jason Garber
Lead Programmer - pulseaday.com
At 12:25 AM 9/21/2001 +0100, Matt C wrote:
I have summaries of episodes stored in a database. How on earth do I go about highlighting keywords? I mean I have done a search and it gives a list of urls: episodes.php?id=4&highlight=max But how do I get it to go through all the words and highlight "max" or whatever keyword it is?? _________________________________________________________________ Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net For additional commands, e-mail: php-db-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net