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

23 Views Asked by At

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

0

There are 0 best solutions below