Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Like Yahoo Search Results 1

Status
Not open for further replies.

alsaffar

Programmer
Oct 25, 2001
165
KW
Let's say I have a field called (Words) in a table called (Search) and the data in the (Words) field is "I LOVE PHP MORE THAN MY LIFE", so what I want is, when I qurey the DB:

SELECT Words FROM Search WHERE Words like '%LOVE%'

I want the word(s) that I'm qureing on to be highlited or colored in the results on my php page, (e.g. Like if you search Yahoo, all the words you're searching in the results will be bolded)

How can I achieve my goal? Remeber that the (Words) field have more that the word that Im seraching, how can I highlight only the serach keyword? so the result will be like the following:

I LOVE PHP MORE THAN MY LIFE.

Please help me guys :(
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top