I have this code:
echo str_replace('\', '', $query);
But this generates an error.
Parse error: syntax error, unexpected single-quoted string ", ", expecting ")"
How do I replace a backslash?
'\' is a special character. Try instead:
echo str_replace('\\','',$query);