note 54447 modified in function.html-entity-decode by danbrown

From: Date: Tue, 10 Jan 2012 20:14:48 +0000
Subject: note 54447 modified in function.html-entity-decode by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-185545@lists.php.net to get a copy of this message
[If you are missing the html_entity_decode() function in your version of PHP, you may wish to try this code snippet.] <?php if( !function_exists( 'html_entity_decode' ) ) { function html_entity_decode( $given_html, $quote_style = ENT_QUOTES ) { $trans_table = array_flip(get_html_translation_table( HTML_SPECIALCHARS, $quote_style )); $trans_table['&#39;'] = "'"; return ( strtr( $given_html, $trans_table ) ); } } ?> --was-- if( !function_exists( 'html_entity_decode' ) ) { function html_entity_decode( $given_html, $quote_style = ENT_QUOTES ) { $trans_table = array_flip(get_html_translation_table( HTML_SPECIALCHARS, $quote_style )); $trans_table['&#39;'] = "'"; return ( strtr( $given_html, $trans_table ) ); } } http://php.net/manual/en/function.html-entity-decode.php

« previous php.notes (#185545) next »