我的数组是这样的
阵 ( [0] =>排列 ( [id] => 1 [name] =>管理员 )
"%zu"
)
和 我正在努力创造
答案 0 :(得分:1)
foreach($data as $row) {
$dropdownlist[$row['id']] = $row['name'];
}
$insAttr = "class='form-control'";
echo form_dropdown("idDropdown", $dropdownlist, "", $insAttr);