Table of contents Home page
$table = get_html_translation_table(HTML_ENTITIES); foreach ($table as $char => $ent) { echo "$char - $ent\n"; }
$table = get_html_translation_table(HTML_SPECIALCHARS, ENT_QUOTES); foreach ($table as $char => $ent) { echo "$char - $ent\n"; }
$table = get_html_translation_table(HTML_ENTITIES, ENT_COMPAT, 'ISO-8859-1'); foreach ($table as $char => $ent) { echo iconv('ISO-8859-1', 'UTF-8', "$char - $ent\n"); // Note that get_html_translation_table returns ISO-8859-1 encoded characters because of the value of its third // argument. However, we assume that the display device uses UTF-8 encoding, so we use iconv to convert these // characters in order to have them displayed correctly. }