public function detail() { $id = I('get.id', '3'); $good = $this->get_detail('mall_good', $id); $good = goodimg_format($good); $this->assign('good', $good); $this->display(); }
function goodlist_format($goods) { foreach ($goods as $key => $value) { $goods[$key] = goodimg_format($value); } return $goods; }