get_html_translation_table() translates text to its HTML equivalent. : get_html_translation_table « HTML « PHP






get_html_translation_table() translates text to its HTML equivalent.

 
Its syntax is: string get_html_translation_table (int table)

The two tables that can be specified as input parameters to this function are:

HTML_ENTITIES
HTML_SPECIALCHARS

<?
    $string = "adsf";
    $translate = get_html_translation_table(HTML_ENTITIES);
    print strtr($string, $translate);
?>
  
  








Related examples in the same category

1.get html translation table: decode
2.get_html_translation_table: encode