[PHP-DB] Searching/keywords

2001-09-20 Thread Matt C
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=4highlight=max But how do I get it to go through all the words and highlight max or whatever keyword it is??

Re: [PHP-DB] Searching/keywords

2001-09-20 Thread olinux
you could probably use a str_replace() www.php.net $description1 = Episode 1 - Joey eats all of the food in the house; Suppose the search term is food - just go thru and replace food with bfood/b or whatever tags you want to use. olinux --- Matt C [EMAIL PROTECTED] wrote: I have summaries of

Re: [PHP-DB] Searching/keywords

2001-09-20 Thread Jason G.
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