-Original Message-
From: Jennifer Goodie [mailto:[EMAIL PROTECTED]
Sent: 09 July 2003 00:43
$filevalue = str_replace(\\, /, $filevalue);
it is reversing the \\ to // but not replacing them
with just a single
/.
I think you need to escape your \ so each \ is \\ so your
I'm trying to understand how the code works within the preg_replace function
but the manual is just obscure as the examples are. Anyway, I am looking to
use it to replace \\ in a string with / and I can not figure how how.
At first, I thought I could just do:
$filevalue = preg_replace('\\', /,
- Original Message -
From: Micah Montoy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 4:01 PM
Subject: [PHP] preg_replace - understanding
I'm trying to understand how the code works within the preg_replace
function
but the manual is just obscure as the examples
PROTECTED] wrote in message
news:[EMAIL PROTECTED]
- Original Message -
From: Micah Montoy [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 4:01 PM
Subject: [PHP] preg_replace - understanding
I'm trying to understand how the code works within the preg_replace
$filevalue = str_replace(\\, /, $filevalue);
it is reversing the \\ to // but not replacing them with just a single
/.
I think you need to escape your \ so each \ is \\ so your string should be
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit:
PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 5:43 PM
Subject: RE: [PHP] preg_replace - understanding
$filevalue = str_replace(\\, /, $filevalue);
it is reversing the \\ to // but not replacing them with just a
single
/.
I think you need to escape your \ so each \ is \\ so
Never mind. Its working.
thanks
- Original Message -
From: Jennifer Goodie [EMAIL PROTECTED]
To: Micah Montoy [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Tuesday, July 08, 2003 5:43 PM
Subject: RE: [PHP] preg_replace - understanding
$filevalue = str_replace(\\, /, $filevalue
7 matches
Mail list logo