我创建了一个列表框,如下所示
echo "<select name="listbox1" multiple>";
echo "<option value="0">-Select-</option>";
foreach ($Details as $Id => $Name) {
echo "<option value="$Id">$Name</option>";
}
echo "</select>";
现在我想检索这些值 我试试这些
$retrievelist['listbox1']= $this->input->post('listbox1');
var_dump($retrievelist);
仅显示所选项目中的第一项。提前谢谢
答案 0 :(得分:1)
将此echo "<select name="listbox1" multiple>";
更改为echo "<select name="listbox1[]" multiple>";