PHP get_html_translation_table() Function

0

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. You may also like How to Dynamic PHP and html form with qty price and total in table using JavaScript calculations .

Example

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

Output

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