public function getRegAll() { $regions = DJClassifiedsRegion::getRegions(); $sort_regions = DJClassifiedsRegion::getRegListAll($regions); //echo '<pre>';print_r($sort_regions);echo '</pre>';die(); return $sort_regions; }
public static function getParentPath($rid = '0') { $regs = DJClassifiedsRegion::getRegions(); $reg_path = array(); if (count($regs)) { while ($rid != 0) { foreach ($regs as $r) { if ($r->id == $rid) { $rid = $r->parent_id; $reg_path[] = $r; break; } } } } //echo '<pre>';print_r($reg_path);echo '</pre>';die(); return $reg_path; }