note 16136 deleted from function.htmlentities by jimw
| From: | jimw@php.net | Date: | Mon, 17 Dec 2001 22:29:14 +0000 |
| Subject: | note 16136 deleted from function.htmlentities by jimw | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-23023@lists.php.net to get a copy of this message | ||
For everybody would like to convert { to the original char:
function numeral2original($in) {
while(ereg("&#([0-9]{0,4});",$in,$x)) {
$out .= substr($in,0,strpos($in,$x[0])).chr($x[1]);
$in = substr($in,strpos($in,$x[0])+strlen($x[0]));
}
return $out.$in;
}
Have phun, just mail me for comments...
[Editor's Note:
Or see get_html_translation_table() and str_replace()/strtr()
--zak@php.net]