码迷,mamicode.com
首页 > Web开发 > 详细

json_decode时含有中文是解码问题(json_decode返回为null)

时间:2015-08-26 15:17:20      阅读:128      评论:0      收藏:0      [点我收藏+]

标签:

function myDecode($str){
    $str = substr(str_replace(‘\"‘,‘"‘,json_encode($str)),1,-1);
    return json_decode($str);  
}

 

json_decode时含有中文是解码问题(json_decode返回为null)

标签:

原文地址:http://www.cnblogs.com/share123/p/4760420.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!