get_html_translation_table

get_html_translation_table -- Returns the translation table used by htmlspecialchars() and htmlentities()

Description

string get_html_translation_table ( int table [, int quote_style])

דוגמה 1 .

 
$trans

 
=

 
get_html_translation_table(

 
HTML_ENTITIES)

 
;

 
$str

 
=

 
"Hallo

 
Frau

 
Krהmer"

 
;

 
$encoded

 
=

 
strtr($str

 
,

 
$trans)

 
;



The $encoded variable will now contain: "Hallo amp; lt;Frau gt; amp; Kr auml;mer".




The content of $original would be: "Hallo Frau Krהmer".

See also : htmlspecialchars( ) , htmlentities( ) , strtr( ) , and array_flip( ) .