Manu
Manu

Reputation: 831

Encoding smileys in a string with mb_convert_encoding

I would like to encode smileys in PHP.

For example : 😋

$string = "blah blah 😋 blah";
mb_convert_encoding($string, "HTML-ENTITIES", "UTF-8");

I'm getting :

blah blah 😋 blah

But I would like :

blah blah 😋 blah

How I can achieve that in PHP ?

Thank you !

Upvotes: 0

Views: 21

Answers (0)

Related Questions