2016-11-10 83 views

回答

1

您可以使用json_decode方法,因爲JSON直接支持爲\ uXXXX語法

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

更多參考嘗試此鏈接 - http://php.net/manual/en/function.json-decode.php

+1

你**需要**或你「可以」?據我所知,有多種方法可以做到這一點。 – Xorifelse