thinkphp查询数据库,遍历出来

php文件:

public function article()
    {
        $notice_list = Db::table('cd_article')
            ->where('ac_id','<>',0)
            ->field('*')
            ->select();
        View::assign('notice_list',$notice_list);

        return $this->display('article');
    }

html文件:


       

                {volist name="notice_list" id="vo"}
                 
  • {$vo.title}

  •              {/volist}
           

你可能感兴趣的:(thinkphp查询数据库,遍历出来)