Remove all backslashes from PHP urldecoded string

后端 未结 5 1159
悲哀的现实
悲哀的现实 2021-01-18 05:03

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

5条回答
  •  我在风中等你
    2021-01-18 05:23

    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.

提交回复
热议问题