From c78ed10a19e054cc52c1e8f77dcd50c34abcd787 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Fri, 8 Jul 2005 08:57:39 +0000 Subject: [PATCH] Returns only one form (bug #33553) Remove duplicate example, add see also git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@190239 c90b9560-bf6c-de11-be94-00142212c4b1 --- .../functions/get-html-translation-table.xml | 32 +++++++------------ 1 file changed, 12 insertions(+), 20 deletions(-) diff --git a/reference/strings/functions/get-html-translation-table.xml b/reference/strings/functions/get-html-translation-table.xml index a9294ecdbf..e01d1092a3 100644 --- a/reference/strings/functions/get-html-translation-table.xml +++ b/reference/strings/functions/get-html-translation-table.xml @@ -1,5 +1,5 @@ - + @@ -35,6 +35,15 @@ ENT_COMPAT mode. See the description of these modes in htmlspecialchars. + + + Special characters can be encoded in several ways. E.g. + " can be encoded as &quot;, + &#34; or &#x22. + get_html_translation_table returns only the most + common form for them. + + Translation Table Example @@ -52,27 +61,10 @@ $encoded = strtr($str, $trans); "Hallo &amp; &lt;Frau&gt; &amp; Kr&auml;mer". - - Another interesting use of this function is to, with help of array_flip, - change the direction of the translation. - - - -]]> - - - The content of $original would be: "Hallo & - <Frau> & Krämer". - See also htmlspecialchars, - htmlentities, - strtr, and - array_flip. + htmlentities, and + html_entity_decode.