function objtoarr($curl){
$ret = array();
foreach($curl as $key =>$value){
if(gettype($value) == 'array' || gettype($value) == 'object'){
$ret[$key] = objtoarr($value);
}else{
$ret[$key] = $value;
}
}
return $ret;
}
function objtoarr($curl){
$ret = array();
foreach($curl as $key =>$value){
if(gettype($value) == 'array' || gettype($value) == 'object'){
$ret[$key] = objtoarr($value);
}else{
$ret[$key] = $value;
}
}
return $ret;
}
本文标题:php json转数组
本文链接:https://www.haomeiwen.com/subject/unlxpqtx.html
网友评论