As I was writing a php code last week, I struggled with a function that was
supposed to convert Unicode code to a character. At last I wrote this

function unicodeToChr($param) {

        $a =json_decode('{"t":"'.$param.'"}');

        return $a->t;

In this function the $param should be something like '\u0627'. I want to
know if it's acceptable to use this function? Does exist any better
solution to do that?

Reply via email to