如何用适当的 UTF-8 替换所有数字实体?
例如:在源代码中,字符串显示如下:
$string1 = "The Devil's in the Details";
$string2 = "Dónde estás, hermano?";
我需要用
echo string1; //OUTPUTS Should be: The Devil's in the details
echo string2; //OUTPUTS Should be: Dónde Estás, Hermano?
我试过html_entity_decode()
了,但没有用;有任何想法吗?