php json_decode无法处理\解决方法

details字段带有\这个字符

<pre>
$php =urlencode('eee\ee');
$dfda='[
{"company":"测试","job":"11","start":"2016.09","end":"2016.11","details":"'.$aa.'","time":"1467460549","income":"12121"}
]
$work_experience = json_decode($dfda, true);
print_r($work_experience);
exit();
</pre>

所以直接传json的数据的时候 最好里面的非数字内容全部urlencode传过来 确保万无一失

 

 

 

posted @ 2019-11-12 15:19  newmiracle宇宙  阅读(144)  评论(0编辑  收藏  举报