note 52957 added to function.get-html-translation-table

From: Date: Wed, 18 May 2005 23:30:09 +0000
Subject: note 52957 added to function.get-html-translation-table
Groups: php.notes 
Request: Send a blank email to php-notes+get-89606@lists.php.net to get a copy of this message
If you want to display special HTML entities in a web browser, you can use the following code: <? $entities = get_html_translation_table(HTML_ENTITIES); foreach ($entities as $entity) { $new_entities[$entity] = htmlspecialchars($entity); } echo "<pre>"; print_r($new_entities); echo "</pre>"; ?> If you don't, the key name of each element will appear to be the same as the element content itself, making it look mighty stupid. ;) ---- Manual Page -- http://www.php.net/manual/en/function.get-html-translation-table.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+52957 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52957&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52957&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52957&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52957&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52957&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+52957&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#89606) next »