back slashes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





 
 
 Hello all,
 
 I?m attempting to insert a windows path into a mysql database via PHP, but
it keeps ineterpreting the backslashes as escape chars.

Lets say I have a string: 

"c:\www\test"

I want to insert it into a database, but what ends up getting inserted is:

c:wwwtest

 I can not get php to double the back slashes no matter what I do!

$string = str_replace("\\", "\\\\", $string);

That is what I want to do, get all single '\' into double '\\'...

Any suggestions?

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux