Question: Why doesn't the preg_replace have it's matching parenthesis? Also, where does $keyword derive from? What is in it, to be exact.

Oh yeah. Actually the semicolon is part of the style attribute:

$strText = preg_replace("/(".$keyword[$m].")/i", "<span class=\"\" id=\"\" style=\"color:".$COLORS[$m]."; font-weight:bold;\">$1</span>\n", $strText);
You had some good questions. $keyword was not in the code this part was pasted but I forgot to change it. It should be: