public function u10000Action() { $this->action = $this->getRequest()->getActionName(); if ($this->action == "u15000") { $price = 15000; } else { if ($this->action == "u20000") { $price = 20000; } else { if ($this->action == "u25000") { $price = 25000; } else { $price = 10000; } } } $res_array = common_util::categorize_info($this->vindb, $price); for ($i = 0; $i < count($res_array); $i++) { $res_array[$i]["logo_url"] = split(",", $res_array[$i]["CarImageUrl"]); $res_array[$i]["SalePrice"] = number_format($res_array[$i]["SalePrice"]); $res_array[$i]["Mileage"] = number_format($res_array[$i]["Mileage"]); } $this->view->res_obj = json_encode($res_array); $this->view->inventory_obj = json_encode($res_array); $this->view->inventory_info = $res_array; }