note 37740 deleted from function.html-entity-decode by aidan
| From: | aidan@php.net | Date: | Tue, 14 Sep 2004 07:56:14 +0000 |
| Subject: | note 37740 deleted from function.html-entity-decode by aidan | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-76655@lists.php.net to get a copy of this message | ||
Note Submitter: mike [AT] thismeanswar [.] NET
----
OR, this slightly modified DIY version will translate both ' and ' in case the
string you're decoding may contain either or both...
function html_entity_decode( $given_html, $quote_style = ENT_QUOTES ) {
$trans_table = array_flip(get_html_translation_table( HTML_SPECIALCHARS, $quote_style ));
$trans_table['''] = "'";
return ( strtr( $given_html, $trans_table ) );
}