Answer the question
In order to leave comments, you need to log in
PHP Line with 16 code output as emoji unicode?
Good afternoon.
I've been scratching my head for days, rummaged through all the documentation, I can't find an answer.
There is a line in which the hexadecimal code is written.
And you need to use the variable to display it as emoji unicode
Here is the code:
$text = '1f9d2';
//Вот так смайл выводится:
echo "\u{1f9d2}";
//А через переменную не работает:
echo "\u{'$text'}"
Answer the question
In order to leave comments, you need to log in
Is the document encoding correct? and you need to write in uppercaseecho "\u{1F9D2}";
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question