1

code:

<select data-placeholder="Click and Select Menu For Assign..." multiple class="chosen-select form-control" name="assign[]">
    <?php
        $main_menu = explode(",",$menu);
        foreach($main_menu as $fetch)
        {
    ?>
            <option value="<?php echo $fetch; ?>"<?=($fetch==$fetch)? 'selected="selected"':''?>></option>
    <?php
        }
    ?>
    <option value="null" style="color:red;">Select Menu For Assign</option>
    <?php 
        $sql = "select menu from assign";
        $result = mysqli_query($con,$sql);
        while($row = mysqli_fetch_array($result))
        {
            echo "<option value='".$row['menu']."'>".$row['menu']."</option>";
        }
    ?>
</select>

In this code I have create multi select dropdown. Now I want to fetch value inside the multi select dropdown like aaa bbb ccc but now its look like as we see in simple dropdown. So, How can I fix this issue ?Please help me.

Thank You

omkara
  • 974
  • 5
  • 24
  • 50
  • 1
    try this https://stackoverflow.com/questions/18364202/pre-selected-values-for-a-dynamic-drop-down-box-with-multiple-values?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa – Ramesh S May 21 '18 at 11:21

0 Answers0