A couple of PHP ereg_replace questions. I have an array of names:
$ssKeywords = array("Str", "Int", "String", "As", "Integer", "Variant");
However when I use this ereg_replace:
foreach($arKeyword as $aWord) {
$sCode = ereg_replace($aWord, "<span class='ssKeyword'>".$aWord."</span>", $sCode);
}
It will only find the "str" or "int" not the full match. Apparently ereg_replace is greedy, so why is it not looking for the full match?
I managed to get comments working using preg_replace.