PHP get_html_translation_table() Function
Complete PHP String Reference
Definition and Usage
The get_html_translation_table() function returns the translation table used
by the htmlentities() and
htmlspecialchars() functions.
Syntax
get_html_translation_table(function,quotestyle)
|
| Parameter |
Description |
| function |
Optional. Specifies which translation table to return.
Default is HTML_SPECIALCHARS. Possible values:
- HTML_ENTITIES - Translates all characters that need URL-encoding to
be shown properly on a HTML page
- HTML_SPECIALCHARS - Translates some characters that need
URL-encoding to be shown properly on a HTML page
|
| quotestyle |
Optional. Defines how to encode single and double quotes.
Default is ENT_COMPAT Possible values:
- ENT_COMPAT - Encodes double quotes, not single quotes
- ENT_QUOTES - Encodes double and single quotes
- ENT_NOQUOTES - Does not encode single or double quotes
|
Tips and Notes
Tip: Some characters can be encoded several ways. The
get_html_translation_table() function returns the most common encoding.
Example
In this example we will show both translation tables.:
<?php
print_r (get_html_translation_table());
echo "<br />";
print_r (get_html_translation_table(HTML_ENTITIES));
?>
|
The output of the code above will be:
Array
(
["] => " [<] => < [>] => > [&] => &
)
Array
(
[ ] => [¡] => ¡ [¢] => ¢ [£] => £
[¤] => ¤ [¥] => ¥ [¦] => ¦ [§] => §
[¨] => ¨ [©] => © [ª] => ª [«] => «
[¬] => ¬ [] => [®] => ® [¯] => ¯
[°] => ° [±] => ± [²] => ² [³] => ³
[´] => ´ [µ] => µ [¶] => ¶ [·] => ·
[¸] => ¸ [¹] => ¹ [º] => º [»] => »
[¼] => ¼ [½] => ½ [¾] => ¾ [¿] => ¿
[À] => À [Á] => Á [Â] => Â [Ã] => Ã
[Ä] => Ä [Å] => Å [Æ] => Æ [Ç] => Ç
[È] => È [É] => É [Ê] => Ê [Ë] => Ë
[Ì] => Ì [Í] => Í [Î] => Î [Ï] => Ï
[Ð] => Ð [Ñ] => Ñ [Ò] => Ò [Ó] => Ó
[Ô] => Ô [Õ] => Õ [Ö] => Ö [×] => ×
[Ø] => Ø [Ù] => Ù [Ú] => Ú [Û] => Û
[Ü] => Ü [Ý] => Ý [Þ] => Þ [ß] => ß
[à] => à [á] => á [â] => â [ã] => ã
[ä] => ä [å] => å [æ] => æ [ç] => ç
[è] => è [é] => é [ê] => ê [ë] => ë
[ì] => ì [í] => í [î] => î [ï] => ï
[ð] => ð [ñ] => ñ [ò] => ò [ó] => ó
[ô] => ô [õ] => õ [ö] => ö [÷] => ÷
[ø] => ø [ù] => ù [ú] => ú [û] => û
[ü] => ü [ý] => ý [þ] => þ [ÿ] => ÿ
["] => " [<] => < [>] => > [&] => &
)
|
Complete PHP String Reference
The Ektron Intranet
lets you do everything you need to do on your corporate intranet and everything you want to do... all with just one application.
What can you do with the Ektron Intranet? |

|
Navigate through content, documents, assets, colleagues and workgroups quickly and intuitively with enterprise search |

|
Communicate with friends and colleagues with forums, message boards and corporate blogging using the new Social Networking Platform |

|
Promote collaboration among coworkers in your organization through project workspaces where others can efficiently find information and work together |

|
Personalize your company profile by bookmarking and organizing favorite content, uploading assets, posting photos, blogging, and more |

|
Interact with features like tagging, flagging, wikis and ratings found in the Web 2.0 Toolbox |
 |
Author/edit content, manage navigation, menus, audit trails, workflow and approvals with the best in breed Content Management |
|
|
|
|
See why there are 20,000+ Ektron integrations worldwide. Request an
INSTANT DEMO or download a
FREE TRIAL today. |
|