How to get character by unicode value in PHP

1 Answer

0 votes
$unicode_values = [65, 97, 122, 0x20AC, 128038];

foreach ($unicode_values as $value) {
    var_dump(mb_chr($value, 'UTF-8'));
}
 
    


/*
run:
 
string(1) "A"
string(1) "a"
string(1) "z"
string(3) "€"
string(4) "????"
 
*/

 



answered Sep 28, 2023 by avibootz

Related questions

...