I'm having problem with replacing multiple slashes with blank space. I've tried to use both stripslashes function and ereg_replace but the stripslashes function can't strip all the slashes while the ereg_replace function that I've written only can do for even number slashes. Help ?
Senario 1:
$string6 = "FD\\\\\\\'\trt\\\";
$string7 = stripslashes("FD\\\\\\\'\trt\\\");
echo "String6 : ".ereg_replace( "[](*)*", "", $string6);
echo "String7 : $string7";
output :
String6 : FD'trt
String7 : FD\\'trt\
Senario 2 ( add one slash at the back ):
$string6 = "FD\\\\\\\'\trt\\\\";
echo "String6 : ".ereg_replace( "[](*)*", "", $string6);
output :
Parse error: parse error in /xxx/xxx/xxx/ereg_replace.php3 on line 16
And it is same goes with stripslashes function, it shows the same error after I've add one slash at the back of the string ( after 'trt' ).
Any clue?