Re: replacing \ with - in a string
| From: | Merlin | Date: | Mon, 28 Jul 2003 12:08:53 +0000 |
| Subject: | Re: replacing \ with - in a string | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-157170@lists.php.net to get a copy of this message | ||
oh.. you are right, I ment slash.
Workes now. Thanx for the hint :-))
--
<IFRAME
SRC="http://saratoga.globosapiens/associates/report_member.php?u=3&color=EEE
EEE" scrolling=no frameborder=0 TITLE="My travel articles" width="330"
height="155" ALLOWTRANSPARENCY="true"><a href="http://www.globosapiens.net"
title="Worldwide Travel Community"a>Travel Community<a/> </IFRAME>
"John W. Holmes" <holmes072000@charter.net> schrieb im Newsbeitrag
news:3F250D72.9070101@charter.net...
> Merlin wrote:
> > I am trying to replace a backslash inside a string. Somehow nothing
workes,
> > not the str_replce, not preg_replace, not erreg_replace.
>
> $new_str = str_replace('\','-',$old_string);
> or
> $new_str = str_replace("\\",'-',$old_string);
>
> But this begs the question of why do you think you need to do this??
>
> --
> ---John Holmes...
>
> Amazon Wishlist: www.amazon.com/o/registry/3BEXC84AB3A5E/
>
> PHP|Architect: A magazine for PHP Professionals www.phparch.com
>
>
>
>