note 33530 added to function.htmlentities

From: Date: Sun, 29 Jun 2003 17:20:23 +0000
Subject: note 33530 added to function.htmlentities
Groups: php.notes 
Request: Send a blank email to php-notes+get-51170@lists.php.net to get a copy of this message
This function changes all entities to unicode-entities. For example '<' becomes '&#60;', '©' becomes '&#169;', etc. function xmlentities($string, $quote_style=ENT_COMPAT) { $trans = get_html_translation_table(HTML_ENTITIES, $quote_style); foreach ($trans as $key => $value) $trans[$key] = '&#'.ord($key).';'; return strtr($string, $trans); } ---- Manual Page -- http://www.php.net/manual/en/function.htmlentities.php Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+33530 Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+33530&report=yes Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+33530&report=yes

« previous php.notes (#51170) next »