Is there a function that replaces exact words and not patterns? For example, I want to look for the word PRO and highlight the word, but I don’t want to highlight PROGRAMMER. The below works for patterns, but not exact words... Any idea would be greatly appreciated…
$arrayNum=count($string_array);
for ($i=0;$i<$arrayNum;++$i){
$blob=eregi_replace("($string_array[$i])","<font color='#291589'><SPAN STYLE='background-color:#EEEEFF;'><b>\1</b></SPAN></font>", $blob);
}