I want to replace the string . I have used the following code to do that.
str_replace("\","/",$abc);
But it is showing error. please let me know what to do
I want to replace the string . I have used the following code to do that.
str_replace("\","/",$abc);
But it is showing error. please let me know what to do
收起
You need to escape your backslash:
str_replace("\\","/",$abc);
From the documentation:
To specify a literal backslash, double it (
\\
).
报告相同问题?