PHP get_html_translation_table()函数用法讲解

编程学习 2021-07-04 23:24www.dzhlxh.cn编程入门
今天长沙网络推广就为大家分享一篇关于PHP get_html_translation_table()函数用法讲解,长沙网络推广觉得内容挺不错的,现在分享给大家,具有很好的参考价值,需要的朋友一起跟随长沙网络推广来看看吧

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; 
[&] => &amp; 
[<] => &lt; 
[>] => &gt; 
)

实例 2

HTML_ENTITIES 的翻译表:

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

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

Array 

["] => &quot; 
[&] => &amp; 
[<] => &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; 
)

总结

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

Copyright © 2016-2025 www.dzhlxh.cn 金源码 版权所有 Power by

网站模板下载|网络推广|微博营销|seo优化|视频营销|网络营销|微信营销|网站建设|织梦模板|小程序模板