note 45720 added to function.html-entity-decode

From: Date: Thu, 16 Sep 2004 09:33:48 +0000
Subject: note 45720 added to function.html-entity-decode
Groups: php.notes 
Request: Send a blank email to php-notes+get-76808@lists.php.net to get a copy of this message
The suggestion to use another function in versions prior to 4.3.0 works fine, though for compatibility reasons you might want to consider declaring it as follows: if ( !function_exists ( 'html_entity_decode' ) ) { function html_entity_decode ($string) { $trans_tbl = get_html_translation_table(HTML_ENTITIES); $trans_tbl = array_flip($trans_tbl); return strtr($string, $trans_tbl); } } It saves you the trouble of renaming all references to html_entity_decode(). ---- Manual Page -- http://www.php.net/manual/en/function.html-entity-decode.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45720 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45720&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45720&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#76808) next »