note 27970 deleted from function.html-entity-decode by sniper
| From: | sniper@php.net | Date: | Tue, 21 Oct 2003 09:54:17 +0000 |
| Subject: | note 27970 deleted from function.html-entity-decode by sniper | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-58983@lists.php.net to get a copy of this message | ||
Note Submitter: martin@swertcw.com
----
If you're using a PHP version before 4.3.0:
function decodeHTML($string) {
$string = strtr($string, array_flip(get_html_translation_table(HTML_ENTITIES)));
$string = preg_replace("/&#([0-9]+);/me", "chr('\\1')",
$string);
return $string;
}