Hi I'm looking for a encode function for utf8mb4,
$var = = "نور";
echo utf8mb4_encode($string);
output = نور // its $var output in UTFMB4
The output should be "نور" this, its a conversion of $var in utfmb4
The return value of the mb_convert_encoding function could give you the desired result.
$string = "نور";
$result = mb_convert_encoding($string, 'UTF-8', 'Windows-1252');
//$result = mb_convert_encoding($string, 'UTF-8', 'Windows-1254');
echo $result;