$a = '<strong>123</strong>'; //假設這是html代碼
$b = htmlspecialchars($a); //將< >這些符號轉為<等等
echo htmlspecialchars_decode($b); //這個是htmlspecialchars函數的反函數
// echo html_entity_decode($a); //這個也是htmlspecialchars的反函數
//兩個反函數之間的區別自行搜索吧
//應該是轉義的范圍不一樣吧
htmlspecialchars
htmlspecialchars_decode
htmlentities
html_entity_decode
這幾個自己研究吧,我就是簡單記錄一下有這么幾個函數