smarty中下拉框的运用

PHP

    $this->ci_smarty->assign('templet_ids', array( '1', '2', '3' ));
        $this->ci_smarty->assign('templet_types', array(lang('templet_type_one'), lang('templet_type_two'), lang('templet_type_three')));
        $this->ci_smarty->assign('select_item', 1);
        
        $this->ci_smarty->display_common('game/templet/templet_add.php',$is_modal);

html

  <{html_options values=$templet_ids output=$templet_types selected=$select_item}>

  

posted @ 2017-03-27 09:48  ddxg  阅读(154)  评论(0编辑  收藏  举报