php json转数组
2019-03-06 本文已影响0人
昱弟丶
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;
}