Smiley function

Started on the old forum in November 2010 · view the original in the archive · old links redirect here

1 reply · 478 views · started 16 years ago · 1 min read

2 participants
ANGELUS Junior · 17 posts #1

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

wow, ive been missing this site for more than 2 years lol

icen01 Developer · 72 posts #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; }

pin0y likes wap

Sign in to reply.

Similar topics

Keyboard shortcuts

g f
Go to forums
g h
Go to your feed
g m
Go to messages
r
Reply (in a topic)
/
Search
j
Next post
k
Previous post
?
This list
Ctrl/⌘ + Enter
Send what you are writing
Ctrl/⌘ + B / I
Bold / italic while writing
Esc
Close