时间:2021-07-01 10:21:17 帮助过:28人阅读
// Funcion de Object a Array function object_to_array($object) { if(is_array($object) || is_object($object)){ $array = array(); foreach($object as $key => $value){ $array[$key] = $this->object_to_array($value); } return $array; } return $object; } // Funcion de Array a Object function array_to_object($array = array()) { return (object) $array; }