Press "Enter" to skip to content


PHP get_html_translation_table() Function

The PHP get_html_translation_table returns the translation table used by htmlspecialchars() and htmlentities() function in PHP.



Example for PHP get_html_translation_table() Function

var_dump(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES | ENT_HTML5));



NameDescriptionRequired /Optional
tabletable will be . Either HTML_ENTITIES or HTML_SPECIALCHARS. 
flagswhich specify which quotes the table will contain as well as which document type the table is for. The default is ENT_COMPAT | ENT_HTML401. 
encodingEncoding to use. If omitted, the default value for this argument is ISO-8859-1 in versions of PHP prior to 5.4.0, and UTF-8 from PHP 5.4.0 onwards.