PHP - 将特殊字符转换为HTML实体 [英] PHP - Convert Special Characters to HTML Entities
本文介绍了PHP - 将特殊字符转换为HTML实体的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
==& quot;
& ==& amp; amp;
€==>& euro;
< ==& lt;
....
我该怎么做?谢谢。
解决方案
htmlentities()
是您要查找的内容:
http://uk3.php.net/manual/en/function.htmlentities.php
I have a problem with sending emails. If it contains special characters, it won't send. I want to convert the special characters to HTML entities like this:
" ==> "
& ==> &
€ ==> €
< ==> <
....
How can I do this? Thanks.
解决方案
htmlentities()
is what you're looking for:
http://uk3.php.net/manual/en/function.htmlentities.php
这篇关于PHP - 将特殊字符转换为HTML实体的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文