In this URL: http://www.amigosadventistas.org/servicios/biblia/
When you type in a word in order to search the bible for it, it returns a list of all the verses and the keyword highlighted in yellow.
I´d like to know how the function for that query looks like, so that the word gets highlighted.
I´d appreciate any help. Thanks.
function make_snippet($words, $search_terms) { for ($i=0; $i<sizeof($search_terms); $i++) { $words = eregi_replace($search_terms[$i], "<b>" . $search_terms[$i] . "</b>", $words); } return $words; }