PHP get_html_translation_table()函数用法讲解


Posted in PHP onFebruary 16, 2019

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_ )

PHP get_html_translation_table()函数用法讲解

PHP get_html_translation_table()函数用法讲解

实例

HTML_SPECIALCHARS 的翻译表:

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

实例 2

HTML_ENTITIES 的翻译表:

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

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

Array 

["] => " 
[&] => & 
[<] => < 
[>] => > 
[ ] =>   
[¡] => ¡ 
[¢] => ¢ 
[£] => £ 
[¤] => ¤ 
[¥] => ¥ 
[¦] => ¦ 
[§] => § 
[¨] => ¨ 
[©] => © 
[ª] => ª 
[«] => « 
[¬] => ¬ 
[­] => ­ 
[®] => ® 
[¯] => ¯ 
[°] => ° 
[±] => ± 
[²] => ² 
[³] => ³ 
[´] => ´ 
[µ] => µ 
[¶] => ¶ 
[·] => · 
[¸] => ¸ 
[¹] => ¹ 
[º] => º 
[»] => » 
[¼] => ¼ 
[½] => ½ 
[¾] => ¾ 
[¿] => ¿ 
[À] => À 
[Á] => Á 
[Â] =>  
[Ã] => à
[Ä] => Ä 
[Å] => Å 
[Æ] => Æ 
[Ç] => Ç 
[È] => È 
[É] => É 
[Ê] => Ê 
[Ë] => Ë 
[Ì] => Ì 
[Í] => Í 
[Î] => Π
[Ï] => Ï 
[Ð] => Р
[Ñ] => Ñ 
[Ò] => Ò 
[Ó] => Ó 
[Ô] => Ô 
[Õ] => Õ 
[Ö] => Ö 
[×] => × 
[Ø] => Ø 
[Ù] => Ù 
[Ú] => Ú 
[Û] => Û 
[Ü] => Ü 
[Ý] => Ý 
[Þ] => Þ 
[ß] => ß 
[à] => à 
[á] => á 
[â] => â 
[ã] => ã 
[ä] => ä 
[å] => å 
[æ] => æ 
[ç] => ç 
[è] => è 
[é] => é 
[ê] => ê 
[ë] => ë 
[ì] => ì 
[í] => í 
[î] => î 
[ï] => ï 
[ð] => ð 
[ñ] => ñ 
[ò] => ò 
[ó] => ó 
[ô] => ô 
[õ] => õ 
[ö] => ö 
[÷] => ÷ 
[ø] => ø 
[ù] => ù 
[ú] => ú 
[û] => û 
[ü] => ü 
[ý] => ý 
[þ] => þ 
[ÿ] => ÿ 
[Œ] => Œ 
[œ] => œ 
[Š] => Š 
[š] => š 
[Ÿ] => Ÿ 
[ƒ] => ƒ 
[ˆ] => ˆ 
[˜] => ˜ 
[Α] => Α 
[Β] => Β 
[Γ] => Γ 
[Δ] => Δ 
[Ε] => Ε 
[Ζ] => Ζ 
[Η] => Η 
[Θ] => Θ 
[Ι] => Ι 
[Κ] => Κ 
[Λ] => Λ 
[Μ] => Μ 
[Ν] => Ν 
[Ξ] => Ξ 
[Ο] => Ο 
[Π] => Π 
[Ρ] => Ρ 
[Σ] => Σ 
[Τ] => Τ 
[Υ] => Υ 
[Φ] => Φ 
[Χ] => Χ 
[Ψ] => Ψ 
[Ω] => Ω 
[α] => α 
[β] => β 
[γ] => γ 
[δ] => δ 
[ε] => ε 
[ζ] => ζ 
[η] => η 
[θ] => θ 
[ι] => ι 
[κ] => κ 
[λ] => λ 
[μ] => μ 
[ν] => ν 
[ξ] => ξ 
[ο] => ο 
[π] => π 
[ρ] => ρ 
[ς] => ς 
[σ] => σ 
[τ] => τ 
[υ] => υ 
[φ] => φ 
[χ] => χ 
[ψ] => ψ 
[ω] => ω 
[ϑ] => ϑ 
[ϒ] => ϒ 
[ϖ] => ϖ 
[ ] =>   
[ ] =>   
[ ] =>   
[‌] => ‌ 
[‍] => ‍ 
[‎] => ‎ 
[‏] => ‏ 
[?] => – 
[—] => — 
['] => ‘ 
['] => ’ 
[‚] => ‚ 
["] => “ 
["] => ” 
[„] => „ 
[†] => † 
[‡] => ‡ 
[•] => • 
[…] => … 
[‰] => ‰ 
[′] => ′ 
[″] => ″ 
[‹] => ‹ 
[›] => › 
[‾] => ‾ 
[⁄] => ⁄ 
[?] => € 
[ℑ] => ℑ 
[℘] => ℘ 
[ℜ] => ℜ 
[™] => ™ 
[ℵ] => ℵ 
[←] => ← 
[↑] => ↑ 
[→] => → 
[↓] => ↓ 
[↔] => ↔ 
[↵] => ↵ 
[⇐] => ⇐ 
[⇑] => ⇑ 
[⇒] => ⇒ 
[⇓] => ⇓ 
[⇔] => ⇔ 
[∀] => ∀ 
[∂] => ∂ 
[∃] => ∃ 
[∅] => ∅ 
[∇] => ∇ 
[∈] => ∈ 
[∉] => ∉ 
[∋] => ∋ 
[∏] => ∏ 
[∑] => ∑ 
[−] => − 
[∗] => ∗ 
[√] => √ 
[∝] => ∝ 
[∞] => ∞ 
[∠] => ∠ 
[∧] => ∧ 
[∨] => ∨ 
[∩] => ∩ 
[∪] => ∪ 
[∫] => ∫ 
[∴] => ∴ 
[∼] => ∼ 
[≅] => ≅ 
[≈] => ≈ 
[≠] => ≠ 
[≡] => ≡ 
[≤] => ≤ 
[≥] => ≥ 
[⊂] => ⊂ 
[⊃] => ⊃ 
[⊄] => ⊄ 
[⊆] => ⊆ 
[⊇] => ⊇ 
[?] => ⊕ 
[⊗] => ⊗ 
[⊥] => ⊥ 
[⋅] => ⋅ 
[⌈] => ⌈ 
[⌉] => ⌉ 
[⌊] => ⌊ 
[⌋] => ⌋ 
[〈] => ⟨ 
[〉] => ⟩ 
[◊] => ◊ 
[♠] => ♠ 
[♣] => ♣ 
[♥] => ♥ 
[♦] => ♦ 
)

总结

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

PHP 相关文章推荐
PHP 时间转换Unix时间戳代码
Jan 22 PHP
PHP服务器页面间跳转实现方法
Aug 02 PHP
PHP5函数小全(分享)
Jun 06 PHP
Laravel框架中扩展函数、扩展自定义类的方法
Sep 04 PHP
linux下实现定时执行php脚本
Feb 13 PHP
PHP实现的memcache环形队列类实例
Jul 28 PHP
在WordPress中实现评论头像的自定义默认和延迟加载
Nov 24 PHP
php使用函数pathinfo()、parse_url()和basename()解析URL
Nov 25 PHP
详解cookie验证的php应用的一种SSO解决办法
Oct 20 PHP
学习thinkphp5.0验证类使用方法
Nov 16 PHP
Yii框架函数简单用法分析
Sep 09 PHP
PHP dirname功能及原理实例解析
Oct 28 PHP
PHP5.5基于mysqli连接MySQL数据库和读取数据操作实例详解
Feb 16 #PHP
PHP封装的mysqli数据库操作类示例
Feb 16 #PHP
PHP fprintf()函数用法讲解
Feb 16 #PHP
PHP explode()函数用法讲解
Feb 15 #PHP
php二维数组按某个键值排序的实例讲解
Feb 15 #PHP
php curl简单采集图片生成base64编码(并附curl函数参数说明)
Feb 15 #PHP
实例讲解PHP表单验证功能
Feb 15 #PHP
You might like
自动跳转中英文页面
2006/10/09 PHP
PHP XML数据解析代码
2010/05/26 PHP
PHP实现PDO的mysql数据库操作类
2014/12/12 PHP
PHP实现数组向任意位置插入,删除,替换数据操作示例
2019/04/05 PHP
用JQuery 实现的自定义对话框
2007/03/24 Javascript
JavaScript中的其他对象
2008/01/16 Javascript
JQuery this 和 $(this) 的区别
2009/08/23 Javascript
浏览器页面区域大小的js获取方法
2013/09/21 Javascript
JS+CSS模拟可以无刷新显示内容的留言板实例
2015/03/03 Javascript
Javascript中arguments和arguments.callee的区别浅析
2015/04/24 Javascript
javascript原始值和对象引用实例分析
2015/04/25 Javascript
jquery实现动态改变div宽度和高度
2015/05/08 Javascript
Bootstrap登陆注册页面开发教程
2016/07/12 Javascript
vue的安装及element组件的安装方法
2018/03/09 Javascript
vuex state及mapState的基础用法详解
2018/04/19 Javascript
深入理解Node内建模块和对象
2019/03/12 Javascript
sharp.js安装过程中遇到的问题总结
2020/04/02 Javascript
微信小程序实现电子签名功能
2020/07/29 Javascript
vue开发chrome插件,实现获取界面数据和保存到数据库功能
2020/12/01 Vue.js
微信小程序弹窗禁止页面滚动的实现代码
2020/12/30 Javascript
python概率计算器实例分析
2015/03/25 Python
Python实现LRU算法的2种方法
2015/06/24 Python
python ddt数据驱动最简实例代码
2019/02/22 Python
Python实现Excel自动分组合并单元格
2021/02/22 Python
东南亚排名第一的服务市场:kaodim
2019/03/28 全球购物
澳大利亚窗帘商店:Curtain Wonderland
2019/12/01 全球购物
PHP面试题及答案一
2012/06/18 面试题
个人找工作求职简历的自我评价
2013/10/20 职场文书
门卫人员岗位职责
2013/12/24 职场文书
银行开业庆典方案
2014/02/06 职场文书
班班通项目实施方案
2014/02/25 职场文书
警示教育活动总结
2014/05/05 职场文书
班级体育活动总结
2014/07/05 职场文书
退休欢送会致辞
2015/07/31 职场文书
高通2023 年将发布高性能PC处理器
2022/04/29 数码科技
Oracle删除归档日志及添加定时任务
2022/06/28 Oracle