Press "Enter" to skip to content

php-get-html-translation-table-function

PHP get_html_translation_table() Function

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

SYNTAX

get_html_translation_table(table,flags,character-set)

Example for PHP get_html_translation_table() Function

<?php
var_dump(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES | ENT_HTML5));
?>

PARAMETER

 

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.