Skip to content Skip to sidebar Skip to footer

Convert Keyboard Emoticons Into Custom Png And Vice Versa

Now this is a straight and simple question. How can I achieve these two things. FIRST Input - hey I'm smiling 😁 Output - hey I'm smiling

Solution 1:

Try str_replace.

First:

<?php$string = "hey I'm smiling 😁";
echo str_replace("😁", "<span class =\"smile\"></span>", $string);
?>

Second:

<?php$string = "hey I'm smiling :smile:";
echo str_replace(":smile:", "😁", $string);
?>

Post a Comment for "Convert Keyboard Emoticons Into Custom Png And Vice Versa"