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: [EMAIL PROTECTED]
>For additional commands, e-mail: [EMAIL PROTECTED]
>To contact the list administrators, e-mail: [EMAIL PROTECTED]
>


-- 
PHP Database 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