Get the translation table used by htmlspecialchars() and htmlentities() in PHP

Description

The following code shows how to get the translation table used by htmlspecialchars() and htmlentities().

Example


//from w ww. j a  va 2 s  .co  m
//Translation Table Example
<?php
var_dump(get_html_translation_table(HTML_ENTITIES, ENT_QUOTES | ENT_HTML5));
?>

The code above generates the following result.





















Home »
  PHP Tutorial »
    Data Types »




Array
Array Associative
Array Util
ArrayObject
Data Types
Date
Date Format
DateTime
Number
String
String Escape
String Filter
String HTML
String Type
Timezone