Reputation: 15
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?
Upvotes: 0
Views: 167
Reputation: 91
'\' is a special character. Try instead:
echo str_replace('\\','',$query);
Upvotes: 3