Page 1 of 1

how to replace smilies code with images?

Posted: Sat May 26, 2007 4:01 am
by amir
Hello,
I am storing user comments ( text + smilies ) in database. Text in simlpe format and smilies in code. For example,

hi
:uhh:
ok
:D

I have smilies images in a folder named smilies, now i want to know that how can I replace this smilie code with images?

thanx

Posted: Sat May 26, 2007 6:22 am
by smudge
Look up the function eregi_replace on php.net. That should help you out.

Posted: Sat May 26, 2007 6:29 am
by Chris Corbyn
Even just str_replace will work.