[Solved] How can I replace a blackslash character? [duplicate]
[ad_1] To replace a backslash you have to escape it with another backslash. So in your example to replace \\ you have to escape each of them with backslash, so you can try this $replaced = str_replace(‘\\\\’, ‘\\’, $str1); [ad_2] solved How can I replace a blackslash character? [duplicate]