當前位置: 首頁> 函數類別大全> get_html_translation_table

get_html_translation_table

返回使用htmlspecialchars() 和htmlentities() 後的轉換錶
名稱:get_html_translation_table
分類:字符串
所屬語言:php
一句話介紹:返回由htmlspecialchars() 和htmlentities() 使用的翻譯表。

實例

例子1

輸出htmlspecialchars 函數使用的翻譯表:

 <span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token function">print_r</span> <span class="token punctuation">(</span> <span class="token function">get_html_translation_table</span> <span class="token punctuation">(</span> <span class="token punctuation">)</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span> <span class="token comment">// HTML_SPECIALCHARS 為默認</span>
<span class="token delimiter important">?></span></span>

親自試一試

例子2

HTML_SPECIALCHARS 的翻譯表:

 <span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token function">print_r</span> <span class="token punctuation">(</span> <span class="token function">get_html_translation_table</span> <span class="token punctuation">(</span> <span class="token constant">HTML_SPECIALCHARS</span> <span class="token punctuation">)</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

顯示字符和實體名:

 Array
(
  ["] => "
  [&] => &
  [<] => <
  [>] => >
)

例子3

HTML_ENTITIES 的翻譯表:

 <span class="token php language-php"><span class="token delimiter important"><?php</span>
<span class="token function">print_r</span> <span class="token punctuation">(</span> <span class="token function">get_html_translation_table</span> <span class="token punctuation">(</span> <span class="token constant">HTML_ENTITIES</span> <span class="token punctuation">)</span> <span class="token punctuation">)</span> <span class="token punctuation">;</span>
<span class="token delimiter important">?></span></span>

顯示字符和實體名:

 Array
(
  ["] => "
  [&] => &
  [<] => <
  [>] => >
  [ ] =>
    [?] => ?
  [?] => ¢
  [?] => £
  [?] => ¤
  [?] => ¥
  [?] => |
  [?] => §
  [?] => ¨
  [?] => ?
  [?] => a
  [?] => ?
  [?] => ?
  [?] => -
  [?] => ?
  [?] => ˉ
  [?] => °
  [?] => ±
  [?] => 2
  [?] => 3
  [?] => ′
  [?] => μ
  [?] => ?
  [?] => ·
  [?] => ?
  [?] => 1
  [?] => o
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => à
  [?] => á
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => è
  [?] => é
  [?] => ê
  [?] => ?
  [?] => ì
  [?] => í
  [?] => ?
  [?] => ?
  [?] => D
  [?] => ?
  [?] => ò
  [?] => ó
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ×
  [?] => ?
  [?] => ù
  [?] => ú
  [?] => ?
  [?] => ü
  [?] => Y
  [?] => T
  [?] => ?
  [?] => à
  [?] => á
  [?] => a
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => è
  [?] => é
  [?] => ê
  [?] => ?
  [?] => ì
  [?] => í
  [?] => ?
  [?] => ?
  [?] => e
  [?] => ?
  [?] => ò
  [?] => ó
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ÷
  [?] => ?
  [?] => ù
  [?] => ú
  [?] => ?
  [?] => ü
  [?] => y
  [?] => t
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?

  [?] => ?
  [?] => ?
  [?] => ?
  [Α] => Α
  [Β] => Β
  [Γ] => Γ
  [Δ] => Δ
  [Ε] => Ε
  [Ζ] => Ζ
  [Η] => Η
  [Θ] => Θ
  [Ι] => Ι
  [Κ] => Κ
  [Λ] => Λ
  [Μ] => Μ
  [Ν] => Ν
  [Ξ] => Ξ
  [Ο] => Ο
  [Π] => Π
  [Ρ] => Ρ
  [Σ] => Σ
  [Τ] => Τ
  [Υ] => Υ
  [Φ] => Φ
  [Χ] => Χ
  [Ψ] => Ψ
  [Ω] => Ω
  [α] => α
  [β] => β
  [γ] => γ
  [δ] => δ
  [ε] => ε
  [ζ] => ζ
  [η] => η
  [θ] => θ
  [ι] => ι
  [κ] => κ
  [λ] => λ
  [μ] => μ
  [ν] => ν
  [ξ] => ξ
  [ο] => ο
  [π] => π
  [ρ] => ρ
  [?] => ?
  [σ] => σ
  [τ] => τ
  [υ] => υ
  [φ] => φ
  [χ] => χ
  [ψ] => ψ
  [ω] => ω
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => –
  [?] => —
  [?] => &#39;
  [?] => &#39;
  [?] => ?
  [?] => “
  [?] => ”
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => …
  [?] => ‰
  [′] => ′
  [″] => ″
  [?] => ?
  [?] => ?
  [ ̄] =>  ̄
  [?] => ?
  [?] => €
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [←] => ←
  [↑] => ↑
  [→] => →
  [↓] => ↓
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [∈] => ∈
  [?] => ?
  [?] => ?
  [∏] => ∏
  [∑] => ∑
  [?] => ?
  [?] => ?
  [√] => √
  [∝] => ∝
  [∞] => ∞
  [∠] => ∠
  [∧] => ∧
  [∨] => ∨
  [∩] => ∩
  [∪] => ∪
  [∫] => ∫
  [∴] => ∴
  [~] => ~
  [?] => ?
  [≈] => ≈
  [≠] => ≠
  [≡] => ≡
  [≤] => ≤
  [≥] => ≥
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [⊕] => ⊕
  [?] => ?
  [⊥] => ⊥
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
  [?] => ?
)
同類函數
  • 計算字符串的md5哈希值 md5

    md5

    計算字符串的md5哈希值
  • 隨機打亂一個字符串 str_shuffle

    str_shuffle

    隨機打亂一個字符串
  • 計算字符串的metaphone鍵 metaphone

    metaphone

    計算字符串的metaphone鍵
  • 檢查字符串是否以給定的子字符串開頭 str_starts_with

    str_starts_with

    檢查字符串是否以給定的子字符串開頭
  • 刪除字符串末端的空白字符(或者其他字符) rtrim

    rtrim

    刪除字符串末端的空白字符(或者其他字符)
  • 檢查字符串是否以給定的子字符串結尾 str_ends_with

    str_ends_with

    檢查字符串是否以給定的子字符串結尾
  • 獲取不匹配遮罩的起始子字符串的長度 strcspn

    strcspn

    獲取不匹配遮罩的起始子字符串的長度
  • 計算字符串中全部字符都存在於指定字符集合中的第一段子串的長度 strspn

    strspn

    計算字符串中全部字符都存在於指定字符集合