note 22015 added to function.get-html-translation-table
| From: | alan at akbkhome dot com | Date: | Tue, 04 Jun 2002 02:00:41 +0000 |
| Subject: | note 22015 added to function.get-html-translation-table | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-31400@lists.php.net to get a copy of this message | ||
If you want to decode all those { symbols as well....
function unhtmlentities ($string) {
$trans_tbl = get_html_translation_table (HTML_ENTITIES);
$trans_tbl = array_flip ($trans_tbl);
$ret = strtr ($string, $trans_tbl);
return preg_replace('/\&\#([0-9]+)\;/me',
"chr('\\1')",$ret);
}
--
http://www.php.net/manual/en/function.get-html-translation-table.php
http://master.php.net/manage/user-notes.php?action=edit+22015
http://master.php.net/manage/user-notes.php?action=delete+22015
http://master.php.net/manage/user-notes.php?action=reject+22015