PHP get_html_translation_table() Function
The get_html_translation_table()
function is used to return the conversion table used by htmlspecialchars() and htmlentities(). These functions are used to encode special characters in HTML.
Syntax
get_html_translation_table(function,flags,character-set)
Parameter | Description |
---|---|
function | (Optional) Specifies the translation table to return.
|
flags | (Optional) Specify which citations should be included in the table and what types of documents should be included in the table.
|
character-set | (Optional) A string indicating which character set to use.
|
Display HTML_SPECIALCHARS
Example
<?php print_r (get_html_translation_table(HTML_SPECIALCHARS)); ?>
Output
Array ( ["] => " [&] => & [<] => < [>] => > )
Display HTML_ENTITIES
Example
<?php print_r (get_html_translation_table(HTML_ENTITIES)); ?>
Output
Array ( ["] => " [&] => & [<] => < [>] => > [ ] => [¡] => ¡ [¢] => ¢ [£] => £ [¤] => ¤ [Â¥] => ¥ [¦] => ¦ [§] => § [¨] => ¨ [©] => © [ª] => ª [«] => « [¬] => ¬ [Â] => [®] => ® [¯] => ¯ [°] => ° [±] => ± [²] => ² [³] => ³ [´] => ´ [µ] => µ [¶] => ¶ [·] => · [¸] => ¸ [¹] => ¹ [º] => º [»] => » [¼] => ¼ [½] => ½ [¾] => ¾ [¿] => ¿ [À] => À [Ã] => Á [Â] =>  [Ã] => à [Ä] => Ä [Ã…] => Å [Æ] => Æ [Ç] => Ç [È] => È [É] => É [Ê] => Ê [Ë] => Ë [ÃŒ] => Ì [Ã] => Í [ÃŽ] => Î [Ã] => Ï [Ã] => Ð [Ñ] => Ñ [Ã’] => Ò [Ó] => Ó [Ô] => Ô [Õ] => Õ [Ö] => Ö [×] => × [Ø] => Ø [Ù] => Ù [Ú] => Ú [Û] => Û [Ãœ] => Ü [Ã] => Ý [Þ] => Þ [ß] => ß [à ] => à [á] => á [â] => â [ã] => ã [ä] => ä [Ã¥] => å [æ] => æ [ç] => ç [è] => è [é] => é [ê] => ê [ë] => ë [ì] => ì [Ã] => í [î] => î [ï] => ï [ð] => ð [ñ] => ñ [ò] => ò [ó] => ó [ô] => ô [õ] => õ [ö] => ö [÷] => ÷ [ø] => ø [ù] => ù [ú] => ú [û] => û [ü] => ü [ý] => ý [þ] => þ [ÿ] => ÿ [Å’] => Œ [Å“] => œ [Å ] => Š [Å¡] => š [Ÿ] => Ÿ [Æ’] => ƒ [ˆ] => ˆ [Ëœ] => ˜ [Α] => Α [Î’] => Β [Γ] => Γ [Δ] => Δ [Ε] => Ε [Ζ] => Ζ [Η] => Η [Θ] => Θ [Ι] => Ι [Κ] => Κ [Λ] => Λ [Îœ] => Μ [Î] => Ν [Ξ] => Ξ [Ο] => Ο [Î ] => Π [Ρ] => Ρ [Σ] => Σ [Τ] => Τ [Î¥] => Υ [Φ] => Φ [Χ] => Χ [Ψ] => Ψ [Ω] => Ω [α] => α [β] => β [γ] => γ [δ] => δ [ε] => ε [ζ] => ζ [η] => η [θ] => θ [ι] => ι [κ] => κ [λ] => λ [μ] => μ [ν] => ν [ξ] => ξ [ο] => ο [Ï€] => π [Ï] => ρ [Ï‚] => ς [σ] => σ [Ï„] => τ [Ï…] => υ [φ] => φ [χ] => χ [ψ] => ψ [ω] => ω [Ï‘] => ϑ [Ï’] => ϒ [Ï–] => ϖ [ ] => [ ] => [ ] => [‌] => [â€] => [‎] => [â€] => [–] => – [—] => — [‘] => ‘ [’] => ’ [‚] => ‚ [“] => “ [â€] => ” [„] => „ [†] => † [‡] => ‡ [•] => • […] => … [‰] => ‰ [′] => ′ [″] => ″ [‹] => ‹ [›] => › [‾] => ‾ [â„] => ⁄ [€] => € [â„‘] => ℑ [℘] => ℘ [â„œ] => ℜ [â„¢] => ™ [ℵ] => ℵ [â†] => ← [↑] => ↑ [→] => → [↓] => ↓ [↔] => ↔ [↵] => ↵ [â‡] => ⇐ [⇑] => ⇑ [⇒] => ⇒ [⇓] => ⇓ [⇔] => ⇔ [∀] => ∀ [∂] => ∂ [∃] => ∃ [∅] => ∅ [∇] => ∇ [∈] => ∈ [∉] => ∉ [∋] => ∋ [âˆ] => ∏ [∑] => ∑ [−] => − [∗] => ∗ [√] => √ [âˆ] => ∝ [∞] => ∞ [∠] => ∠ [∧] => ∧ [∨] => ∨ [∩] => ∩ [∪] => ∪ [∫] => ∫ [∴] => ∴ [∼] => ∼ [≅] => ≅ [≈] => ≈ [≠] => ≠ [≡] => ≡ [≤] => ≤ [≥] => ≥ [⊂] => ⊂ [⊃] => ⊃ [⊄] => ⊄ [⊆] => ⊆ [⊇] => ⊇ [⊕] => ⊕ [⊗] => ⊗ [⊥] => ⊥ [â‹…] => ⋅ [⌈] => ⌈ [⌉] => ⌉ [⌊] => ⌊ [⌋] => ⌋ [〈] => ⟨ [〉] => ⟩ [â—Š] => ◊ [â™ ] => ♠ [♣] => ♣ [♥] => ♥ [♦] => ♦ )