2013-11-24 56 views
0

当我输出的东西(从我的UTF-8 DB)像UTF-8特殊字符输出

this "text" is nice 

html代码显示

this "text" is nice 

如何准确显示撇号"用PHP?

感谢

+0

?为我们输入使用的PHP代码。 – saulotoledo

+0

显示您正在用来打印 –

+0

的PHP行,如果没有答案为您工作,请添加一些代码。 – FRECIA

回答

0

使用html_entity_decode

从PHP手册:你在使用打印本文

<?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 
?>