$type=array(1,2,4);
$this->assign('type',$type);
$this->display();
模板为以下:<input type="checkbox" name="type[]" id="type" value="1" />值1
<input type="checkbox" name="type[]" id="type" value="2" />值2
<input type="checkbox" name="type[]" id="type" value="3" />值3
<input type="checkbox" name="type[]" id="type" value="4" />值4
<input type="checkbox" name="type[]" id="type" value="5" />值5
对上面checkbox 加selected选中,用TP内置的标签哪个啊,in? eq? 手册不推荐使用if 最佳答案
