cracknew 發表於 2024年4月1日 22:33:58

html_entity_decode & encode

<?php
$orig = "I'll \"walk\" the <b>dog</b> now";

$a = htmlentities($orig);

$b = html_entity_decode($a);

echo $a;    // I'll &quot;walk&quot; the &lt;b&gt;dog&lt;/b&gt; now

echo $b;   // I'll "walk" the <b>dog</b> now
?>
頁: [1]
檢視完整版本: html_entity_decode & encode