note 18937 added to function.htmlentities

From: Date: Sun, 10 Feb 2002 14:35:17 +0000
Subject: note 18937 added to function.htmlentities
Groups: php.notes 
Request: Send a blank email to php-notes+get-26449@lists.php.net to get a copy of this message
Please delete this if it's been posted before: <? function unhtmlentities($str) { $trans = get_html_translation_table(HTML_ENTITIES); $trans = array_flip($trans); return strtr($str, $trans); } $strEntities = "&quot;&lt;&iexcl;&copy;"; $strEntities .= "&macr;&micro;&micro;"; $strEntities .= "&iquest;&Atilde;&Aring;"; $strEntities .= "&Iacute;&Ntilde;&Ugrave;"; $strEntities .= "&aacute;&euml;&ntilde;"; $strEntities .= "&divide;&yacute;&rsquo;"; $strEntities .= "&uuml;&ocirc;&eth;"; $strEntities .= "&egrave;&auml;&THORN;"; $strEntities .= "&Oslash;&Ocirc;&Icirc;&Ecirc;"; $strEntities .= "&Auml;&frac34;&cedil;&sup2;"; $strEntities .= "&reg;&brvbar;&curren;&nbsp;"; echo unhtmlentities($strEntities); ?> The ".=" is so it doesn't mess this page up. -- http://www.php.net/manual/en/function.htmlentities.php http://master.php.net/manage/user-notes.php?action=edit+18937 http://master.php.net/manage/user-notes.php?action=delete+18937 http://master.php.net/manage/user-notes.php?action=reject+18937

« previous php.notes (#26449) next »