我正在使用bootstrap 3,我有一个双面多选框。一侧应显示第二侧不存在的所有行,反之亦然。我正在使用php mysql。
<select name="job_rights[]" multiple="multiple" id="msc">
<?php
foreach ($all_active_locations as $value) {
//$selected = in_array ($value["location_id"],$user_location_rights_selected["selected_loc_id"]) ? ' selected="selected" ' : '';
echo '<option value="' . $value["location_id"] . '" selected( true, in_array($value["location_id"], $user_location_rights_selected["selected_loc_id"]) );>'
. $value["location_id"] .'/'. $value["location_name"] . '</option>';
}
?>
</select>