PHP get_html_translation_table() Function

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

Tip: Some characters can be encoded several ways. The get_html_translation_table() function returns the most common encoding.

Example

<?php
print_r (get_html_translation_table()); // HTML_SPECIALCHARS is default.
?>

Output

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

Leave a Reply

Your email address will not be published. Required fields are marked *