Slash issue with json_encode. Why and how to solve it?

前端 未结 2 1074
长情又很酷
长情又很酷 2020-12-06 01:26

Why outputting this date (\"2011/7/11\") with json_encode displays (\"2011\\/7\\/11\")?

How can I convert \"2011\\/7\\/1

2条回答
  •  醉梦人生
    2020-12-06 02:01

    $data_go = str_replace('\'','', $data_go);
    

    it will remove all forwards slashes and will give you desired result..

提交回复
热议问题