note 34395 deleted from function.htmlentities by hholzgra

From: Date: Thu, 02 Aug 2012 11:21:38 +0000
Subject: note 34395 deleted from function.htmlentities by hholzgra
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-189582@lists.php.net to get a copy of this message
Note Submitter: defrostdj at defrostdj dot com ---- Here you have a character map function ;) <?php function htmldecode($encoded, $char = 'HTML_SPECIALCHARS') { foreach($encoded as $key => $value){ echo $value .' --> '; if ($char == 'HTML_SPECIALCHARS') { echo htmlspecialchars($value); } else { echo htmlentities($value); } echo '&gtbr&lt'; } } echo 'ENTITIES<&gtbr&lt><&gtbr&lt>'; $entities = get_html_translation_table (HTML_ENTITIES); htmldecode($entities, 'HTML_ENTITIES'); echo '<&gtbr&lt>SPECIAL CHARACTERS<&gtbr&lt><&gtbr&lt>'; $specialchars = get_html_translation_table (HTML_SPECIALCHARS); htmldecode($specialchars, 'HTML_SPECIALCHARS'); ?> So next time you're developing you'll always have a charmap ready to use.

« previous php.notes (#189582) next »