php3-list | 199908
Date: 08/25/99
- Next message: Jeff Hoffmann: "Re: [PHP3] Emailing Attachments"
- Previous message: Paulo Parola: "[PHP3] BLOBs in PostgreSQL"
- In reply to: 8523543: "[PHP3] Hello..."
- Next in thread: Rick Beebe: "Re: [PHP3] Hello..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
If you have a more recent version of PHP I would use preg_replace.
all you would have to do is:
$newitem=preg_replace(":\\:", "\", $item);
this would do it. This is a perl compatible regular expression in which I
am using colons for delimiters. (If I wasn't the search expression would
look like "/\\/" which I try to avoid.)
I believe this function is in PHP 3.0.9 or later.
Good Luck.
--Derrek
"Ask me that again using different words." --Divy
> Hello!
>
> I have a question...
> I would like to covert all backslash(\) to some other character in a string.
> How can I do?
> I have tried the following function:
> $string = ereg_replace("\\","*",$string);
> but it did not work.
> How should I express the backslash in PHP3 ?
> Thank you for your response!!
>
> Ken Tsai
>
>
>
> --
> PHP 3 Mailing List <http://www.php.net/>
> To unsubscribe, send an empty message to php3-unsubscribe <email protected>
> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected>
> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3
> To contact the list administrators, e-mail: php-list-admin <email protected>
>
-- PHP 3 Mailing List <http://www.php.net/> To unsubscribe, send an empty message to php3-unsubscribe <email protected> To subscribe to the digest, e-mail: php3-digest-subscribe <email protected> To search the mailing list archive, go to: http://www.php.net/mailsearch.php3 To contact the list administrators, e-mail: php-list-admin <email protected>
- Next message: Jeff Hoffmann: "Re: [PHP3] Emailing Attachments"
- Previous message: Paulo Parola: "[PHP3] BLOBs in PostgreSQL"
- In reply to: 8523543: "[PHP3] Hello..."
- Next in thread: Rick Beebe: "Re: [PHP3] Hello..."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

