I have one message string e.g:
$data="Hey my dear :laugh: how are you :mmmmm: :smile: and non existing smile :go: ";
and I have smile array(for checking)
$smileys=array("laugh","mmmm","smile");
yesterday friends helped me and I convert :smile:
type to like down
$data=preg_replace("/:([a-zA-Z]+):/","<img src='images/smileys/$1.png' class='smile'>",$data);
and how can I check this smile exists or no in array?
example: http://masters.az
login:test
pass:test
code example:http://masters.az/message-3