Highlight String in PHP
Function for highlighting text/strings in PHP.
$content = file_get_contents("http://php.net/");
print highlight("PHP", $content);
function highlight($match, $string){
return str_ireplace($match, "<span style='background:yellow'>$match</span&...
Written by Sean Behan on 06/17/2012