public function sortarea($area, $parent_id = 0, $lev = 1){ static $list; foreach($area as $v){ if($v['upid'] == $parent_id){ $v['lev'] = $lev; $list[] = $v; $this->sortarea($area,$v['cid'],$lev+1); } } return $list; }
$newArr = array(); foreach($Res as $key=>$val){ foreach($val as $k=>$v){ $newArr[] = $v; } }