PHP Code:
// This will determine things what you want to replace
$replace = array(":)", ":D", ":(");
// This will determine your text replacement
$replace_to = array("<img src='smile.gif'>", "<img src='laugh.gif'>", "<img src='sad.gif'>");
$content = str_replace($replace, $replaceto, $text);
With the str_replace when you use the $replaceto variable, shouldn't it be $replace_to, like the variables name?