html_entity_decode與htmlentities函數


htmlentities() 函數把字符轉換為 HTML 實體。
html_entity_decode() 函數把 HTML 實體轉換為字符。
例子:
$a = '<div> <p>11111&&222</p></div>';
$b = htmlentities($a);
$c = html_entity_decode($b);
echo $b."\n";
echo $c;
頁面輸出:
htmlentities輸出內容:<div> <p>11111&&222</p></div>
html_entity_decode輸出內容:11111&&222
---------------------
作者:Goh_Sunny
來源:CSDN
原文:https://blog.csdn.net/qq_34206560/article/details/79488236
版權聲明:本文為博主原創文章,轉載請附上博文鏈接!


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM