Hi -
Still somewhat new to PHP, so I'm at a slight sticking point.
I'm trying to process the text from a form input to scan for alert words. Here's what I'm presently doing (note that $content is the text string from the form):
$badwords = array("doodoo","peepee","kaka");
$num_badwords = count($badwords);
for ($i=0; $i<=$num_badwords; $i++) {
$content = eregi_replace($badwords[$i],"<font color='red'>$badwords[$i]</font>",$content);
}
Simple enough. but I get a REG_EMPTY error message when I try to put it in place.
Any ideas?
Thanks,
shaBANG