php html_entity_decode() 适用于php 4.3.0+,将html 实体转成字符。
html_entity_decode(包含html 实体的字符串, 可选如何解码引号, 可选字符编码集)
如果字符串中包含无法被识别的字符集将被忽略,并由 iso-8859-1 代替。您可以使用 php htmlentities() 将html标签、引号及ascii字符集外的其他字符串转换成html 实体。
如何解码引号:
ent_compat - 默认。仅解码双引号。
ent_quotes - 解码双引号和单引号。
ent_noquotes - 不解码任何引号。
字符编码集:
iso-8859-1 - 默认。西欧。
iso-8859-15 - 西欧 (增加 euro 符号以及法语、芬兰语字母)。
utf-8 - ascii 兼容多字节 8 比特 unicode
cp866 - dos 专用 cyrillic 字符集
cp1251 - windows 专用 cyrillic 字符集
cp1252 - windows 专用西欧字符集
koi8-r - 俄语
gb2312 - 简体中文,国家标准字符集
big5 - 繁体中文
big5-hkscs - big5 香港扩展
shift_jis - 日语
euc-jp - 日语
php htmlspecialchars() 把 & ' 转换成html 实体
php htmlspecialchars_decode() 把 & ' html 实体反转成字符
php htmlentities() 把html标签字符转换为 html 实体
php html_entity_decode() 将所有html 实体转成字符原型
php html_entity_decode() 实例虽然使用php htmlentities() 只能对html标签字符串进行html 实体化,但是您可以使用php html_entity_decode() 对所有html 实体化的字符进行转换成字符。
原文:http://e.v-get.com/w3c/php_html_entity_decode.html
http://www.bkjia.com/phpjc/729852.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/729852.htmltecharticlephp html_entity_decode() 适用于php 4.3.0+,将html 实体转成字符。 html_entity_decode(包含html 实体的字符串, 可选如何解码引号, 可选字符编码集) 如果...