I’m using a javascript and this code to try and replace smiley code with the smilies in a guestbook. It DOES work except it displays both the smiley AND the code. Help?
[php]<?php
$code = array("",":biggrin:",":blah:");
$img = array("<img src=“smilies/angry.gif”/>","<img src=“smilies/biggrin.gif”/>","<img src=“smilies/blah.gif”/>");
echo str_replace($code,$img,$entry[“comments”]);
?>[/php]