主页 > 知识库 > PHP get_html_translation_table()函数用法讲解

PHP get_html_translation_table()函数用法讲解

热门标签:Mysql连接数设置 服务器配置 电子围栏 阿里云 银行业务 科大讯飞语音识别系统 Linux服务器 团购网站

PHP get_html_translation_table() 函数

实例

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

?php 
print_r (get_html_translation_table()); // HTML_SPECIALCHARS is default. 
?>

定义和用法

get_html_translation_table()函数返回htmlentities()htmlspecialchars()函数使用的翻译表。

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

语法

get_html_translation_table( _function,flags,character-set_ )

实例

HTML_SPECIALCHARS 的翻译表:

?php 
print_r (get_html_translation_table(HTML_SPECIALCHARS)); 
?>
Displaying character and entity name:
Array 
( 
["] => quot; 
[] =>  
[] => lt; 
[>] => gt; 
)

实例 2

HTML_ENTITIES 的翻译表:

?php 
print_r (get_html_translation_table(HTML_ENTITIES)); 
?>

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

Array 

["] => quot; 
[] =>  
[] => lt; 
[>] => gt; 
[ ] => nbsp; 
[¡] => iexcl; 
[¢] => cent; 
[£] => pound; 
[¤] => curren; 
[¥] => yen; 
[¦] => brvbar; 
[§] => sect; 
[¨] => uml; 
[©] => copy; 
[ª] => ordf; 
[«] => laquo; 
[¬] => not; 
[­] => shy; 
[®] => reg; 
[¯] => macr; 
[°] => deg; 
[±] => plusmn; 
[²] => sup2; 
[³] => sup3; 
[´] => acute; 
[µ] => micro; 
[¶] => para; 
[·] => middot; 
[¸] => cedil; 
[¹] => sup1; 
[º] => ordm; 
[»] => raquo; 
[¼] => frac14; 
[½] => frac12; 
[¾] => frac34; 
[¿] => iquest; 
[À] => Agrave; 
[Á] => Aacute; 
[Â] => Acirc; 
[Ã] => Atilde; 
[Ä] => Auml; 
[Å] => Aring; 
[Æ] => AElig; 
[Ç] => Ccedil; 
[È] => Egrave; 
[É] => Eacute; 
[Ê] => Ecirc; 
[Ë] => Euml; 
[Ì] => Igrave; 
[Í] => Iacute; 
[Î] => Icirc; 
[Ï] => Iuml; 
[Ð] => ETH; 
[Ñ] => Ntilde; 
[Ò] => Ograve; 
[Ó] => Oacute; 
[Ô] => Ocirc; 
[Õ] => Otilde; 
[Ö] => Ouml; 
[×] => times; 
[Ø] => Oslash; 
[Ù] => Ugrave; 
[Ú] => Uacute; 
[Û] => Ucirc; 
[Ü] => Uuml; 
[Ý] => Yacute; 
[Þ] => THORN; 
[ß] => szlig; 
[à] => agrave; 
[á] => aacute; 
[â] => acirc; 
[ã] => atilde; 
[ä] => auml; 
[å] => aring; 
[æ] => aelig; 
[ç] => ccedil; 
[è] => egrave; 
[é] => eacute; 
[ê] => ecirc; 
[ë] => euml; 
[ì] => igrave; 
[í] => iacute; 
[î] => icirc; 
[ï] => iuml; 
[ð] => eth; 
[ñ] => ntilde; 
[ò] => ograve; 
[ó] => oacute; 
[ô] => ocirc; 
[õ] => otilde; 
[ö] => ouml; 
[÷] => divide; 
[ø] => oslash; 
[ù] => ugrave; 
[ú] => uacute; 
[û] => ucirc; 
[ü] => uuml; 
[ý] => yacute; 
[þ] => thorn; 
[ÿ] => yuml; 
[Œ] => OElig; 
[œ] => oelig; 
[Š] => Scaron; 
[š] => scaron; 
[Ÿ] => Yuml; 
[ƒ] => fnof; 
[ˆ] => circ; 
[˜] => tilde; 
[Α] => Alpha; 
[Β] => Beta; 
[Γ] => Gamma; 
[Δ] => Delta; 
[Ε] => Epsilon; 
[Ζ] => Zeta; 
[Η] => Eta; 
[Θ] => Theta; 
[Ι] => Iota; 
[Κ] => Kappa; 
[Λ] => Lambda; 
[Μ] => Mu; 
[Ν] => Nu; 
[Ξ] => Xi; 
[Ο] => Omicron; 
[Π] => Pi; 
[Ρ] => Rho; 
[Σ] => Sigma; 
[Τ] => Tau; 
[Υ] => Upsilon; 
[Φ] => Phi; 
[Χ] => Chi; 
[Ψ] => Psi; 
[Ω] => Omega; 
[α] => alpha; 
[β] => beta; 
[γ] => gamma; 
[δ] => delta; 
[ε] => epsilon; 
[ζ] => zeta; 
[η] => eta; 
[θ] => theta; 
[ι] => iota; 
[κ] => kappa; 
[λ] => lambda; 
[μ] => mu; 
[ν] => nu; 
[ξ] => xi; 
[ο] => omicron; 
[π] => pi; 
[ρ] => rho; 
[ς] => sigmaf; 
[σ] => sigma; 
[τ] => tau; 
[υ] => upsilon; 
[φ] => phi; 
[χ] => chi; 
[ψ] => psi; 
[ω] => omega; 
[ϑ] => thetasym; 
[ϒ] => upsih; 
[ϖ] => piv; 
[ ] => ensp; 
[ ] => emsp; 
[ ] => thinsp; 
[‌] => zwnj; 
[‍] => zwj; 
[‎] => lrm; 
[‏] => rlm; 
[–] => ndash; 
[—] => mdash; 
['] => lsquo; 
['] => rsquo; 
[‚] => sbquo; 
["] => ldquo; 
["] => rdquo; 
[„] => bdquo; 
[†] => dagger; 
[‡] => Dagger; 
[•] => bull; 
[…] => hellip; 
[‰] => permil; 
[′] => prime; 
[″] => Prime; 
[‹] => lsaquo; 
[›] => rsaquo; 
[‾] => oline; 
[⁄] => frasl; 
[€] => euro; 
[ℑ] => image; 
[℘] => weierp; 
[ℜ] => real; 
[™] => trade; 
[ℵ] => alefsym; 
[←] => larr; 
[↑] => uarr; 
[→] => rarr; 
[↓] => darr; 
[↔] => harr; 
[↵] => crarr; 
[⇐] => lArr; 
[⇑] => uArr; 
[⇒] => rArr; 
[⇓] => dArr; 
[⇔] => hArr; 
[∀] => forall; 
[∂] => part; 
[∃] => exist; 
[∅] => empty; 
[∇] => nabla; 
[∈] => isin; 
[∉] => notin; 
[∋] => ni; 
[∏] => prod; 
[∑] => sum; 
[−] => minus; 
[∗] => lowast; 
[√] => radic; 
[∝] => prop; 
[∞] => infin; 
[∠] => ang; 
[∧] => and; 
[∨] => or; 
[∩] => cap; 
[∪] => cup; 
[∫] => int; 
[∴] => there4; 
[∼] => sim; 
[≅] => cong; 
[≈] => asymp; 
[≠] => ne; 
[≡] => equiv; 
[≤] => le; 
[≥] => ge; 
[⊂] => sub; 
[⊃] => sup; 
[⊄] => nsub; 
[⊆] => sube; 
[⊇] => supe; 
[⊕] => oplus; 
[⊗] => otimes; 
[⊥] => perp; 
[⋅] => sdot; 
[⌈] => lceil; 
[⌉] => rceil; 
[⌊] => lfloor; 
[⌋] => rfloor; 
[〈] => lang; 
[〉] => rang; 
[◊] => loz; 
[♠] => spades; 
[♣] => clubs; 
[♥] => hearts; 
[♦] => diams; 
)

总结

以上就是这篇文章的全部内容了,希望本文的内容对大家的学习或者工作具有一定的参考学习价值,谢谢大家对脚本之家的支持。如果你想了解更多相关内容请查看下面相关链接

您可能感兴趣的文章:
  • PHP正则判断一个变量是否为正整数的方法
  • PHP正则验证字符串是否为数字的两种方法并附常用正则
  • PHP判断是否是微信打开还是浏览器打开的方法
  • asp函数split()对应php函数explode()
  • PHP htmlentities()函数用法讲解
  • PHP html_entity_decode()函数讲解
  • PHP hex2bin()函数用法讲解
  • PHP hebrev()函数用法讲解
  • php二维数组按某个键值排序的实例讲解
  • PHP实时统计中文字数和区别

标签:广元 江苏 萍乡 蚌埠 衡水 衢州 枣庄 大理

巨人网络通讯声明:本文标题《PHP get_html_translation_table()函数用法讲解》,本文关键词  ;如发现本文内容存在版权问题,烦请提供相关信息告之我们,我们将及时沟通与处理。本站内容系统采集于网络,涉及言论、版权与本站无关。
  • 相关文章
  • 收缩
    • 微信客服
    • 微信二维码
    • 电话咨询

    • 400-1100-266