public function shop_collect() { $id = $this->id; $result_array = array(); $CollectionModel = new \Home\Model\CollectionModel(); $ShopModel = new \Home\Model\ShopModel(); $shop_collect = $CollectionModel->get_shop_collect($id); foreach ($shop_collect as $piece) { $shop_info = $ShopModel->get_shop_info($piece["collect_id"]); array_push($result_array, array("shop_info" => $shop_info, "collect_info" => $piece)); } $this->assign("result", $result_array); $this->display(); }