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生成唯一的促销/优惠/折扣码(附源码)
Dec 28 PHP
PHP运行模式的深入理解
Jun 03 PHP
小谈php正则提取图片地址
Mar 27 PHP
php缩放gif和png图透明背景变成黑色的解决方法
Oct 14 PHP
php中关于socket的系列函数总结
May 18 PHP
php实现向javascript传递数组的方法
Jul 27 PHP
Zend Framework自定义Helper类相关注意事项总结
Mar 14 PHP
php生成带logo二维码方法小结
Apr 08 PHP
php+ajax注册实时验证功能
Jul 20 PHP
PHP入门教程之数学运算技巧总结
Sep 11 PHP
Yii框架弹出窗口组件CJuiDialog用法分析
Jan 07 PHP
PHP+AjaxForm异步带进度条上传文件实例代码
Aug 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
CL vs ForZe BO5 第三场 2.13
2021/03/10 DOTA
ModelDialog JavaScript模态对话框类代码
2011/04/17 Javascript
主页面中的两个iframe实现鼠标拖动改变其大小
2013/04/16 Javascript
Javascript Ajax异步读取RSS文档具体实现
2013/12/12 Javascript
JS中的log对象获取以及debug的写法介绍
2014/03/03 Javascript
jQuery内置的AJAX功能和JSON的使用实例
2014/07/27 Javascript
实例讲解避免javascript冲突的方法
2016/01/03 Javascript
AngularJS中如何使用$parse或$eval在运行时对Scope变量赋值
2016/01/25 Javascript
JS中dom0级事件和dom2级事件的区别介绍
2016/05/05 Javascript
jQuery实现点击DIV同时点击CheckBox,并为DIV上背景色的实例
2017/12/18 jQuery
Vue-Router2.X多种路由实现方式总结
2018/02/09 Javascript
Vue实现双向绑定的原理以及响应式数据的方法
2018/07/02 Javascript
JavaScript实现星级评价效果
2019/05/17 Javascript
js获取本日、本周、本月的时间代码
2020/02/01 Javascript
Vue如何跨组件传递Slot的实现
2020/12/14 Vue.js
[52:08]DOTA2上海特级锦标赛主赛事日 - 3 败者组第三轮#2Fnatic VS OG第一局
2016/03/05 DOTA
详解python3百度指数抓取实例
2016/12/12 Python
正确理解python中的关键字“with”与上下文管理器
2017/04/21 Python
Python的爬虫框架scrapy用21行代码写一个爬虫
2017/04/24 Python
python爬虫框架talonspider简单介绍
2017/06/09 Python
python如何修改装饰器中参数
2018/03/20 Python
详解python中的生成器、迭代器、闭包、装饰器
2019/08/22 Python
Selenium元素定位的30种方式(史上最全)
2020/05/11 Python
PyTorch在Windows环境搭建的方法步骤
2020/05/12 Python
python中os包的用法
2020/06/01 Python
html5调用摄像头功能的实现代码
2018/05/07 HTML / CSS
html5实现的便签特效(实战分享)
2013/11/29 HTML / CSS
专升本个人自我评价
2013/12/22 职场文书
合作经营协议书
2014/04/17 职场文书
环保宣传标语
2014/06/12 职场文书
招商引资工作汇报
2014/10/28 职场文书
综合办公室岗位职责
2015/04/11 职场文书
同事打架检讨书
2015/05/06 职场文书
送给自己的励志语句:要安静的优秀,悄无声息的坚强
2019/11/26 职场文书
基于Redis结合SpringBoot的秒杀案例详解
2021/10/05 Redis
使用Mysql计算地址的经纬度距离和实时位置信息
2022/04/29 MySQL