JSON
复制代码 代码如下:
function ArrEncode($arr){
foreach($arr as $k=>$v){
if(is_array($v)){
$arr[$k] =ArrEncode($v);
}else{
$arr[$k] = urlencode($v);
}
}
return $arr;
}
在控制器方法里面可以。
$arr = ArrEncode($uns);
echo urldecode(json_encode($arr));
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn