note 27970 added to function.html-entity-decode
| From: | martin at swertcw dot com | Date: | Fri, 27 Dec 2002 20:43:56 +0000 |
| Subject: | note 27970 added to function.html-entity-decode | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-41357@lists.php.net to get a copy of this message | ||
If you're not using the CVS version:
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;
}
--
http://www.php.net/manual/en/function.html-entity-decode.php
http://master.php.net/manage/user-notes.php?action=edit+27970
http://master.php.net/manage/user-notes.php?action=delete+27970
http://master.php.net/manage/user-notes.php?action=reject+27970