您好,登錄后才能下訂單哦!
怎么在PHP中使用 get_html_translation_table()函數(shù)?針對這個問題,這篇文章詳細介紹了相對應(yīng)的分析和解答,希望可以幫助更多想解決這個問題的小伙伴找到更簡單易行的方法。
PHP get_html_translation_table() 函數(shù)
實例
輸出 htmlspecialchars 函數(shù)使用的翻譯表:
<?php print_r (get_html_translation_table()); // HTML_SPECIALCHARS is default. ?>
定義和用法
get_html_translation_table()
函數(shù)返回htmlentities()
和htmlspecialchars()
函數(shù)使用的翻譯表。
提示:一些字符可以按照若干種方式進行編碼。get_html_translation_table()
函數(shù)返回最普通的編碼。
語法
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 ( ["] => " [&] => & [<] => < [>] => > )
實例 2
HTML_ENTITIES 的翻譯表:
<?php print_r (get_html_translation_table(HTML_ENTITIES)); ?>
顯示字符及其對應(yīng)的實體名稱:
Array
(
["] => "
[&] => &
[<] => <
[>] => >
[ ] =>
[¡] => ¡
[¢] => ¢
[£] => £
[¤] => ¤
[¥] => ¥
[¦] => ¦
[§] => §
[¨] => ¨
[©] => ©
[ª] => ª
[«] => «
[¬] => ¬
[­] => ­
[®] => ®
[¯] => ¯
[°] => °
[±] => ±
[²] => ²
[³] => ³
[´] => ´
[µ] => µ
[¶] => ¶
[·] => ·
[¸] => ¸
[¹] => ¹
[º] => º
[»] => »
[¼] => ¼
[½] => ½
[¾] => ¾
[¿] => ¿
[À] => À
[Á] => Á
[Â] => Â
[Ã] => Ã
[Ä] => Ä
[Å] => Å
[Æ] => Æ
[Ç] => Ç
[È] => È
[É] => É
[Ê] => Ê
[Ë] => Ë
[Ì] => Ì
[Í] => Í
[Î] => Î
[Ï] => Ï
[Ð] => Ð
[Ñ] => Ñ
[Ò] => Ò
[Ó] => Ó
[Ô] => Ô
[Õ] => Õ
[Ö] => Ö
[×] => ×
[Ø] => Ø
[Ù] => Ù
[Ú] => Ú
[Û] => Û
[Ü] => Ü
[Ý] => Ý
[Þ] => Þ
[ß] => ß
[à] => à
[á] => á
[â] => â
[ã] => ã
[ä] => ä
[å] => å
[æ] => æ
[ç] => ç
[è] => è
[é] => é
[ê] => ê
[ë] => ë
[ì] => ì
[í] => í
[î] => î
[ï] => ï
[ð] => ð
[ñ] => ñ
[ò] => ò
[ó] => ó
[ô] => ô
[õ] => õ
[ö] => ö
[÷] => ÷
[ø] => ø
[ù] => ù
[ú] => ú
[û] => û
[ü] => ü
[ý] => ý
[þ] => þ
[ÿ] => ÿ
[?] => Œ
[?] => œ
[?] => Š
[?] => š
[?] => Ÿ
[?] => ƒ
[?] => ˆ
[?] => ˜
[Α] => Α
[Β] => Β
[Γ] => Γ
[Δ] => Δ
[Ε] => Ε
[Ζ] => Ζ
[Η] => Η
[Θ] => Θ
[Ι] => Ι
[Κ] => Κ
[Λ] => Λ
[Μ] => Μ
[Ν] => Ν
[Ξ] => Ξ
[Ο] => Ο
[Π] => Π
[Ρ] => Ρ
[Σ] => Σ
[Τ] => Τ
[Υ] => Υ
[Φ] => Φ
[Χ] => Χ
[Ψ] => Ψ
[Ω] => Ω
[α] => α
[β] => β
[γ] => γ
[δ] => δ
[ε] => ε
[ζ] => ζ
[η] => η
[θ] => θ
[ι] => ι
[κ] => κ
[λ] => λ
[μ] => μ
[ν] => ν
[ξ] => ξ
[ο] => ο
[π] => π
[ρ] => ρ
[?] => ς
[σ] => σ
[τ] => τ
[υ] => υ
[φ] => φ
[χ] => χ
[ψ] => ψ
[ω] => ω
[?] => ϑ
[?] => ϒ
[?] => ϖ
[ ] =>  
[ ] =>  
[ ] =>  
[?] => ‌
[?] => ‍
[?] => ‎
[?] => ‏
[–] => –
[—] => —
['] => ‘
['] => ’
[?] => ‚
["] => “
["] => ”
[?] => „
[?] => †
[?] => ‡
[?] => •
[…] => …
[‰] => ‰
[′] => ′
[″] => ″
[?] => ‹
[?] => ›
[ ̄] => ‾
[?] => ⁄
[?] => €
[?] => ℑ
[?] => ℘
[?] => ℜ
[?] => ™
[?] => ℵ
[←] => ←
[↑] => ↑
[→] => →
[↓] => ↓
[?] => ↔
[?] => ↵
[?] => ⇐
[?] => ⇑
[?] => ⇒
[?] => ⇓
[?] => ⇔
[?] => ∀
[?] => ∂
[?] => ∃
[?] => ∅
[?] => ∇
[∈] => ∈
[?] => ∉
[?] => ∋
[∏] => ∏
[∑] => ∑
[?] => −
[?] => ∗
[√] => √
[∝] => ∝
[∞] => ∞
[∠] => ∠
[∧] => ∧
[∨] => ∨
[∩] => ∩
[∪] => ∪
[∫] => ∫
[∴] => ∴
[~] => ∼
[?] => ≅
[≈] => ≈
[≠] => ≠
[≡] => ≡
[≤] => ≤
[≥] => ≥
[?] => ⊂
[?] => ⊃
[?] => ⊄
[?] => ⊆
[?] => ⊇
[⊕] => ⊕
[?] => ⊗
[⊥] => ⊥
[?] => ⋅
[?] => ⌈
[?] => ⌉
[?] => ⌊
[?] => ⌋
[?] => ⟨
[?] => ⟩
[?] => ◊
[?] => ♠
[?] => ♣
[?] => ♥
[?] => ♦
)
關(guān)于怎么在PHP中使用 get_html_translation_table()函數(shù)問題的解答就分享到這里了,希望以上內(nèi)容可以對大家有一定的幫助,如果你還有很多疑惑沒有解開,可以關(guān)注億速云行業(yè)資訊頻道了解更多相關(guān)知識。
免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點不代表本網(wǎng)站立場,如果涉及侵權(quán)請聯(lián)系站長郵箱:is@yisu.com進行舉報,并提供相關(guān)證據(jù),一經(jīng)查實,將立刻刪除涉嫌侵權(quán)內(nèi)容。