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 相关文章推荐
swfupload 多文件上传实现代码
Aug 27 PHP
php Static关键字实用方法
Jun 04 PHP
PHP中MVC模式的模板引擎开发经验分享
Mar 23 PHP
PHP写的加密函数,支持私人密钥(详细介绍)
Jun 09 PHP
关于php内存不够用的快速解决方法
Oct 26 PHP
PHP 验证登陆类分享
Mar 13 PHP
PHP生成唯一订单号
Jul 05 PHP
php验证码生成代码
Nov 11 PHP
php+jquery+html实现点击不刷新加载更多的实例代码
Aug 12 PHP
php使用curl实现ftp文件下载功能
May 16 PHP
PHP基于自增数据如何生成不重复的随机数示例
May 19 PHP
PHP crc32()函数讲解
Feb 14 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
PHP生成不重复随机数的方法汇总
2014/11/19 PHP
php版微信公众平台接口参数调试实现判断用户行为的方法
2016/09/23 PHP
PHP实现的常规正则验证helper公共类完整实例
2017/04/27 PHP
PHP Trait功能与用法实例分析
2020/06/03 PHP
JS实现淡蓝色简洁竖向Tab点击切换效果
2015/10/06 Javascript
canvas实现简易的圆环进度条效果
2017/02/28 Javascript
vue.js实现用户评论、登录、注册、及修改信息功能
2020/05/30 Javascript
利用Angular.js编写公共提示模块的方法教程
2017/05/28 Javascript
详解axios 全攻略之基本介绍与使用(GET 与 POST)
2017/09/15 Javascript
Javascript的console['']常用输入方法汇总
2018/04/26 Javascript
玩转Koa之koa-router原理解析
2018/12/29 Javascript
浅析vue中的provide / inject 有什么用处
2019/11/10 Javascript
js仿360开机效果
2019/12/26 Javascript
vue数据响应式原理知识点总结
2020/02/16 Javascript
vue学习笔记之slot插槽用法实例分析
2020/02/29 Javascript
Python中关键字global和nonlocal的区别详解
2018/09/03 Python
linux安装Python3.4.2的操作方法
2018/09/28 Python
推荐技术人员一款Python开源库(造数据神器)
2020/07/08 Python
Python实例方法、类方法、静态方法区别详解
2020/09/05 Python
Pycharm安装Qt Design快捷工具的详细教程
2020/11/18 Python
pycharm 使用tab跳出正在编辑的括号(){}{}等问题
2021/02/26 Python
html5 input元素新特性_动力节点Java学院整理
2017/07/06 HTML / CSS
解决H5的a标签的download属性下载service上的文件出现跨域问题
2019/07/16 HTML / CSS
外企C语言笔试题
2013/11/10 面试题
"序列点" 是什么
2016/07/29 面试题
韩国商务邀请函
2014/01/14 职场文书
爸爸的花儿落了教学反思
2014/02/20 职场文书
事业单位绩效考核实施方案
2014/03/27 职场文书
珍惜时间演讲稿
2014/05/14 职场文书
银行职员工作失误检讨书
2014/10/14 职场文书
基于nginx实现上游服务器动态自动上下线无需reload的实现方法
2021/03/31 Servers
Python利用机器学习算法实现垃圾邮件的识别
2021/06/28 Python
MySQL Shell import_table数据导入的实现
2021/08/07 MySQL
详解gantt甘特图可拖拽、编辑(vue、react都可用 highcharts)
2021/11/27 Vue.js
20180830晚上第一届KSL半决赛 雨神vs解冻(二龙 三炮解说)
2022/04/01 星际争霸
python前后端自定义分页器
2022/04/13 Python