I am trying to remove all backslashes from a url-decoded string, but it is outputting \\ rather than outputting the url-decoded string with \\ removed.
Please can yo
You want to use stripslashes(), because that's exactly what it is for. Also looks shorter:
echo urldecode(stripslashes($json));
You should however consider disabling magic_quotes rather.