"\" - is an escape symbol, so you should write it twice in order to escape it self. str_replace ("\\","/",$var)
"Diana Castillo" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > 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 > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php