note 24922 deleted from function.preg-replace-callback by ronabop

From: Date: Sat, 09 Aug 2003 21:11:18 +0000
Subject: note 24922 deleted from function.preg-replace-callback by ronabop
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-53764@lists.php.net to get a copy of this message
Note Submitter: scott (at) hurring.com ---- I really wish PHP would make things like this less awkward... here's the solution (both lines should print exactly the same thing): $val = "%2C"; print preg_replace ("/%([a-fA-F0-9]{2})/e", 'pack("c", hexdec(\'\\1\') )', $val); print pack("c", hexdec($val));

« previous php.notes (#53764) next »