开发者

html source encode

when I view source on my php page I get " for a quote. But instead, I would like " to be used in the source code. I have no control over manually replacing it so Im wondering if there is a function to do开发者_如何学C such a thing.


If you have access to the PHP and want to change all html special characters to their rightful variations use:

print htmlspecialchars_decode($string);


You could do this very simply using str_replace.

$string = str_replace('"', '"', $string);

However, as Levi said, why not just leave it this way? It should have no effect on the display.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜