Quantcast
Channel: Active questions tagged utf-8 - Stack Overflow
Viewing all articles
Browse latest Browse all 1071

PHP - How to decode or parse emoji from unicode string? [duplicate]

$
0
0

In my PHP code, I receive user's emoji as this string "1f49c" from frontend app.

It should be as simple as echo "\u{1f49c}";, but my data is only this string: "1f49c"

How to parse it to 💜?

I've tried:

$emoji = "1f49c";$reaction = "\u".$emoji;json_decode("\"$reaction\"");

but it results: Ὁc not 💜


Viewing all articles
Browse latest Browse all 1071

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>