note 29977 deleted from function.escapeshellarg by victor
| From: | victor@php.net | Date: | Mon, 03 Mar 2003 08:08:56 +0000 |
| Subject: | note 29977 deleted from function.escapeshellarg by victor | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-44761@lists.php.net to get a copy of this message | ||
function duh($a) { return ("\\" . $a); }
$foo = "this (is/a) messed-up path";
$text = preg_replace(
array(
"#(\()#e",
"#(\))#e",
"#(/)#e",
"#( )#e"
), "duh(\"\\1\")", $foo);
print $text;
this\ \(is\/a\)\ messed-up\ path
This was what I came up with. I'm sure there is an easier way but it worked for me... cheers.
--Thom