Can anyone point me in a right direction on how to highlight a word that user has been searching for ?
thank you
Greg
highlight search word
Moderator: General Moderators
str_replace the searched word with a css-class that does the highlightning...
...just to name one ill-written example. But it's an direction... =)
Code: Select all
Original text: Foo is something bar I say! Har har...
Searching for: bar
New text after str_replace: Foo is something <b class="h">bar</b> I say! Har har...