$testJSON=array('error'=>'13','msg'=>'您还没有添加地方版块'); foreach ( $testJSON as $key => $value ) { $testJSON[$key] = urlencode ( $value ); } echo urldecode ( json_encode ( $testJSON ) );
json 数据中文乱码
最新推荐文章于 2025-07-08 11:22:45 发布
$testJSON=array('error'=>'13','msg'=>'您还没有添加地方版块'); foreach ( $testJSON as $key => $value ) { $testJSON[$key] = urlencode ( $value ); } echo urldecode ( json_encode ( $testJSON ) );