note 48328 deleted from function.preg-quote by tomsommer
| From: | tomsommer@php.net | Date: | Sun, 19 Dec 2004 20:53:59 +0000 |
| Subject: | note 48328 deleted from function.preg-quote by tomsommer | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-82059@lists.php.net to get a copy of this message | ||
Note Submitter: Chronial
----
To completely solve _any_ preg quoting problems, use this:
<?php
function c($string) {
for ($i=0;$i<strlen($string);$i++)
$o .= '\\x'.dechex(ord($string{$i}));
return $o;
}
?>