I have test code
$chatText = "Hello world :D";
$chatText = str_replace(":D","<img src='happy.jpg' width='20' height='20' alt='Big Smile' />",$chatText);
echo $chatText;
basically what it does is replace the :D with an image.
What I actually wanted to do is after clicking submit from a <textarea> -replace input value i.e emoticons (image) after post.
How do I check user's input value to check to see if they have type these characters for example
":-)"