note 12984 deleted from function.ereg-replace.php by philip
| From: | philip@php.net | Date: | Mon, 27 Aug 2001 12:27:24 +0000 |
| Subject: | note 12984 deleted from function.ereg-replace.php by philip | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-17186@lists.php.net to get a copy of this message | ||
trying to substitute hexidecimal values with their ascii equivalents within a string. for some
reason this doesn't work:
$string = ereg_replace('%([a-fA-F0-9][a-fA-F0-9])',
''.pack('C',hexdec('\1')).'', $string);
it's replacing the hex values with character #01...for all of them.
my bad?