note 9276 added to htmlentities
| From: | nilesh at coetonline dot com | Date: | Wed, 25 Oct 2000 21:21:03 +0000 |
| Subject: | note 9276 added to htmlentities | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-6944@lists.php.net to get a copy of this message | ||
adding a note in regards to Federico@Pomi.net suggestion.
I had to add a simple reset($trans) function after his code and that got me working.
His modified code is below <only a part>
function literal2numeral(&$value, $key) {$value="&#".ord($key).";";}
$trans=get_html_translation_table (HTML_ENTITIES);
array_walk ($trans, 'literal2numeral');
reset($trans);
http://www.php.net/manual/function.htmlentities.php