Smiley function

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Smiley function

    Can anybody teach me how to write function to add smiley?

    #2
    function getsmilies($text)
    {
    $sql = "SELECT * FROM ibwf_smilies";
    $smilies = mysql_query($sql);
    while($smilie=mysql_fetch_array($smilies))
    {
    $scode = $smilie[1];
    $spath = $smilie[2];
    $text = str_replace($scode,"<img src=\"$spath\" alt=\"$scode\"/>",$text);
    }
    return $text;
    }

    Comment

    Working...
    X