note 85914 modified in function.hexdec by danbrown
| From: | danbrown@php.net | Date: | Wed, 24 Sep 2008 14:37:03 +0000 |
| Subject: | note 85914 modified in function.hexdec by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-144670@lists.php.net to get a copy of this message | ||
Help a hex-stricken string get back to normal:
<?php
$str = preg_replace_callback ("/%([a-zA-Z0-9]{2})/", create_function
('$matches', 'return chr (hexdec ($matches[1]));'), $str);
?>
--was--
Help a hex-stricken string get back to normal:
$str = preg_replace_callback ("/%([a-zA-Z0-9]{2})/", create_function
('$matches', 'return chr (hexdec ($matches[1]));'), $str);
http://php.net/manual/en/function.hexdec.php