使用PHP从字符串中删除字符

I would like to know if there is any way to just remove backslashes '\' from a string with PHP? For some reason, when I use mysqli_real_escape_string() the output text has a '\' before any apostrophes. I know I could you use a function to strip the slashes but I want to keep all forward slashes '/'.

Btw, I've already made sure magic quotes is turned off. The problem still persists.

Thanks

There is a function for that and it is surprisingly called stripslashes

Here it goes: http://php.net/manual/en/function.stripslashes.php

  • It will keep your forward slashes if that's what you're worrying about
QUERY:-remove backslashes '\' from a string but I want to keep all forward slashes '/'. 
After hard working and googled if find result of your query:-

$path="uploads\\folder_name\\ankur/like you"; /////string
echo str_replace("\\"," ",$path);

output:-uploads folder_name ankur/like you