| 
        php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login | 
  [2000-07-18 13:35 UTC] enrico at efc dot it
 When I use htmlentities & htmlspecialchars function (Php4.0.1pl2+Solaris8+Apache1.3.12) they don't work, they don't translate any character. Then I call the get_html_translation_table() function and it returns an array with the key equal to the value for each pair. I think the problem is here, since the above 2 functions use this one. PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits             
             | 
    |||||||||||||||||||||||||||
            
                 
                Copyright © 2001-2025 The PHP GroupAll rights reserved.  | 
        Last updated: Tue Nov 04 14:00:01 2025 UTC | 
<? $a = get_html_translation_table( HTML_SPECIAL_CHARS ); while( $val=each($a) ) echo $val[0]." -> ".$val[1]."<br>"; ?> Give as result: & -> & " -> " < -> < > -> > and the same occurs using HTML_ENTITIES. As conseguence, when I use htmlentities() or htmlspecialchars() no translation occurs. For example: echo htmlspecialchars( "1 < 2" ); returns "1 < 2"