Hello guys

function replace_text_smiley(){

global $comment; 
// To add a relation between a text smiley a an image smiley do this: 
// $faces["text smiley here"] = "img tag to image smile here"; 

$faces[":)"] = "<IMG SRC=\"emoticons/smile.gif\">"; 
$faces[":P"] = "<IMG SRC=\"emoticons/tongue.gif\">"; 
$faces[":D"] = "<IMG SRC=\"emoticons/happy.gif\">"; 
$faces[":("] = "<IMG SRC=\"emoticons/mad.gif\">"; 
$faces[";)"] = "<IMG SRC=\"emoticons/wink.gif\">"; 

while(list($text,$image) = each($faces)) 
{ 
$comment = str_replace("$text","$image","$comment"); 
} 

return $comment; 
} 

this function replaces faces to smilies images 

then in a separete file i use this function and another one to replace urls... the url 
replacement is ok but it doesn't change the text to smilies.. 

any guesses?? :)

Thnx in advance


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to