how do i highlight search results from mysql query using php?
this is my [modified] code:
$search_result = \"\";
$search_result = $
you could use preg_replace();, when it finds a match in your text you could place a div with a class of highlight around the matching word. You would then add a background color and border to the highlight class to make it stand out
preg_replace expect 3 parameters;
so for example
Search Results
".$search_result."", h($row['cArabic'])); ?>
I only did it for arabic but you might need to do that for cQuotes, vAuthor and vReference as well.