I'm using this code to pick out unsuitable words from members that submit text to my site. Instead of substituting the bad words with ###. Is it possible to highlight these unsuitable words in a different color instead of substituting them with ### ? This is the coding I am using now. Thank in advance for any help.
$delimiter="###";
$bad_words = array("bad_word", "another_bad_word");
$new_string = str_replace($bad_words,$delimiter, strtolower($message));
$arr = explode($delimiter, $new_string);
$nr_occurences = count($arr) - 1;
if ($nr_occurences > 0) {
echo "$new_string";
}