Wie ausgewählte Db-Werte in einer Dropdown-Liste ausgewählt werden, wie PHP im Multiselect-Boostrap-Dropdown-Menü?Wie Box-Wert auswählen ausgewählt aus Db-Werten in Boostrap Multiselect js?
Zum Beispiel Php-Codierung,
$array = array("apple", "orange", "lemon");
<select>
<option value=""></option>
<?php
foreach ($array as $data) {
?>
<option value="<?php echo $data ?>" <?php if ($data == "orange") echo "selected"; ?>><?php echo $data ?></option>
<?php } ?>
in PHP db Wert Wählen Sie mit js Selected Wie in Bootstrap Mehrfachauswahl?
<button type="button" class="multiselect dropdown-toggle btn btn-default" data-toggle="dropdown" title="None selected">
None selected
<b class="caret">
</b>
<ul class="multiselect-container dropdown-menu">
<li class="multiselect-item multiselect-all">
<a href="javascript:void(0);" class="multiselect-all">
<label class="checkbox">
<input type="checkbox" name="multiselect" value="multiselect-all">
Select all
</label>
</a>
</li>
<li>
<a href="javascript:void(0);">
<label class="checkbox">
<input type="checkbox" name="multiselect" value="cheese">
Cheese
</label>
</a>
</li>
Wie Wert in über Bootstrap-Multiselect js setzen? Wie die ausgewählte Option in PHP? Zum Beispiel: Wenn Db-Wert kommt Käse ausgewählten Wert in Multiselect Dropdown?
Ohne den entsprechenden JavaScript/jQuery-Code ist es schwer zu sagen, was Sie vorhaben ... –