怎么在PHP中使用get_html_translation_table()函数

  介绍

怎么在PHP中使用get_html_translation_table()函数?针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。

<强> PHP get_html_translation_table()函数

<强>实例

输出:函数使用的翻译表:

& lt; ? php    print_r  (get_html_translation_table ());,//, HTML_SPECIALCHARS  is 默认只   ?在

<强>定义和用法

<代码> get_html_translation_table() 函数返回<代码> htmlentities() 和<代码> htmlspecialchars函数()函数使用的翻译表。

提示:一些字符可以按照若干种方式进行编码。<代码> get_html_translation_table() 函数返回最普通的编码。

<强>语法

get_html_translation_table (_function,旗帜,character-set_ )

怎么在php中使用get_html_translation_table()函数

怎么在php中使用get_html_translation_table()函数

<强>实例

HTML_SPECIALCHARS的翻译表:

& lt; ? php    print_r  (get_html_translation_table (HTML_SPECIALCHARS)),,   比;   Displaying  character 以及entity 名称:   Array    (,   [,],=在,,,,   [,],=在,,,,   [& lt;],=祝辞,和lt;,   [在],=祝辞,和gt;,   )

<>强实例2

HTML_ENTITIES的翻译表:

& lt; ? php    print_r  (get_html_translation_table (HTML_ENTITIES)),,   祝辞;

显示字符及其对应的实体名称:

Array 
(,
[,]=比;,,,
[和]=比;,,,
[& lt;]=比;,lt;,
[在]=比;和gt;,
[]=比;,,,
[和iexcl;]=比;,iexcl;,
[,分;]=比;,分,,
[,英镑;]=比;英镑,,,
[¤]=比;和卡伦牌,,
[,日圆;]=比;,日元,,
[和brvbar;]=比;,brvbar;,
(§)=比;和教派,,
[¨]=比;uml;,,
(及复印件;)=比;和副本,,
[和ordf;]=比;,ordf;,
[和laquo;]=比;,laquo;,
[,,)=比;,,,
[,害羞;]=比;和害羞,,
[, reg;]=比;,注册,,
[及宏观;]=比;和宏观,,
(°)=比;和度,,
(±)=比;,plusmn;,
[和sup2;]=比;,sup2;,
[和sup3;]=比;,sup3;,
[和;急性;]=比;和急性;,
(和微;)=比;和微,,
[, para;]=比;和帕拉,,
(·)=比;和压力,
[和cedil;]=比;,cedil;,
[和sup1;]=比;,sup1;,
[和ordm;]=比;,ordm;,
[和raquo;]=比;,raquo;,
[和frac14;]=比;,frac14;,
[和frac12;]=比;,frac12;,
[和frac34;]=比;,frac34;,
[及技术;]=比;和技术,,
[和Agrave;]=比;,Agrave;,
[和Aacute;]=比;,Aacute;,
[和Acirc;]=比;,Acirc;,
[和Atilde;]=比;,Atilde;,
[和Auml;]=比;,Auml;,
[和撕咬;]=比;,撕咬,,
[和AElig;]=比;,AElig;,
[和Ccedil;]=比;,Ccedil;,
[和Egrave;]=比;,Egrave;,
[及餐厅;]=比;,,,
[和Ecirc;]=比;,Ecirc;,
(和爱情)=比;和爱情,
[和Igrave;]=比;,Igrave;,
[和Iacute;]=比;,Iacute;,
[和Icirc;]=比;,Icirc;,
[和Iuml;]=比;,Iuml;,
[, ETH;]=比;和乙,,
[和Ntilde;]=比;,Ntilde;,
[和Ograve;]=比;,Ograve;,
[和Oacute;]=比;,Oacute;,
[和Ocirc;]=比;,Ocirc;,
[和Otilde;]=比;,Otilde;,
[和Ouml;]=比;,Ouml;,(×)
=比;和时间,,
(,,)=比;,,,
[和Ugrave;]=比;,Ugrave;,
[和Uacute;]=比;,Uacute;,
[和Ucirc;]=比;,Ucirc;,
[和Uuml;]=比;,Uuml;,
[和Yacute;]=比;,Yacute;,
[和荆棘;]=比;和刺,,
[和szlig;]=比;,szlig;,
[a]=比;,agrave;,
[a]=比;,aacute;,
[和acirc;]=比;,acirc;,
[和atilde;]=比;,atilde;,
[和auml;]=比;,auml;,
[和撕咬;]=比;,撕咬,,
[和aelig;]=比;,aelig;,
[和ccedil;]=比;,ccedil;,
[e]=比;,egrave;,
[e]=比;,,,
[e]=比;,ecirc;,
(和爱情)=比;和爱情,
[我]=比;,igrave;,
[我]=比;,iacute;,null

怎么在PHP中使用get_html_translation_table()函数