2014-03-25 113 views

回答

4

您正在尋找html_entity_decode

+0

使用標籤,我得到XML error..that後在第5行的錯誤在列859:xmlParseEntityRef:沒有名字 – user3445862

0

你應該htmlspecialchars_decodehtml_entity_decode較輕去 - 大材小用版

<?php 
$s = '&mdash;,&rdquo;,&rsquo;,&ldquo;'; 
echo htmlspecialchars_decode($s); 

OUTPUT :

—,」,’,「 
0
<?php 
$orig = "I'll \"walk\" the <b>dog</b> now"; 

$a = htmlentities($orig);

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

$b = html_entity_decode($a);

echo $b; // I'll "walk" the <b>dog</b> now 
?> 
+0

在使用該標記後,我得到了xml錯誤..第859行是第5行的錯誤:xmlParseEntityRef:no name – user3445862

相關問題