Is it possible to input a character and get the unicode value back? for example, i can put ⽇ in html to output "⽇", is it possible to give that character as an argument to a function and get the number as an output without building a unicode table?
$val = someFunction("⽇");//returns 12103
or the reverse?
$val2 = someOtherFunction(12103);//returns "⽇"
I would like to be able to output the actual characters to the page not the codes, and I would also like to be able to get the code from the character if possible.The closest I got to what I want is php.net/manual/en/function.mb-decode-numericentity.php but I cant get it working, is this the code I need or am I on the wrong track?