Re: convert "\" to "/"
| From: | Veniamin Goldin | Date: | Wed, 08 Oct 2003 10:51:35 +0000 |
| Subject: | Re: convert "\" to "/" | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-165400@lists.php.net to get a copy of this message | ||
"\" - is an escape symbol, so you should write it twice in order to escape
it self.
str_replace ("\\","/",$var)
"Diana Castillo" <diana@interhotel.com> wrote in message
news:20031008084701.28371.qmail@pb1.pair.com...
> I am receiving some data in which the sender has mistakenly sent urls with
> "\" instead of "/" to separate directories. e.g.
> http://www.anysite.com\page.htm
>
> I need to convert this string to
> http://www.anysite.com/page.htm but str replace
> ("\","/",$var) doesnt
work.
> any ideas as to how to convert it.
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>