0
我得到這個字符串,它是我猜十六進制編碼:如何在PHP中進行十六進制解碼?
<?
$s="lechau";
echo chr(hexdec($s))
?>
我怎樣才能解碼呢?
我得到這個字符串,它是我猜十六進制編碼:如何在PHP中進行十六進制解碼?
<?
$s="lechau";
echo chr(hexdec($s))
?>
我怎樣才能解碼呢?
它們是HTML編碼的unicode字符,不是十六進制編碼的字符串。解碼此,你可以使用html_entity_decode()
,如下:
echo html_entity_decode($s);
會產生:
lechau
什麼是預期的結果?也許只是'hexdec($ s)'?當我運行時,我得到了'119182715281781' – Gohn67
它們是html編碼的unicode字符。 – alkar