hi, what could be wrong with this:
$strNew = str_replace("\\","\",$_GET["path"]);
i want to replace two slashes with a single one.
thanks
al
Since the backslash is a special character, you need to represent each backslash as a doubled backslash. Therefore the search should have four backslashes, not three. Your example should generate a syntax error.
this will replace one of your 2 slashes with nothingness
$word = str_replace(("\") , "",$word);
You sure? I think it would replace both of the two slashes with nothingness (why the extra ()?).
Steve's got the right answer there.