use yiihelpersHtml; use yiihelpersArrayHelper
model层代码
$model = new Model()//要存储的model $aclb = AclB::find()->select('groupname,group_id')->asArray()->all();//要展示的数据
view层
<?= Html::activeDropDownList($model,'shopid', ArrayHelper::map($aclb,'id','name')) ?>
shopid=>是指model表中相对应的字段,id=>是value的值,name=>是显示的数据