dev_avatar dev_avatar - 1 year ago 129
PHP Question

Convert unicode to its actual symbol

How do I convert

to the symbol
in PHP?

I tried utf8_decode() but it is returning the same string.

Answer Source

You can use json_decode method because JSON directly supports the \uxxxx syntax

$unicodeChar = '\u20B9';
echo json_decode('"'.$unicodeChar.'"');

For more reference try this link -

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download