0

Is There A way i can Display Images in a bootstrap list. i have tried but cant seam to get it to work?

if ($result->num_rows > 0) {
    echo '
  <div class="form-group">
  <label for="sel1">To:</label>
  <select class="form-control border-radius" id="sel1">  

    ';
    // output data of each row
    while($row = $result->fetch_assoc()) {
        echo '<option><img src="assets/img/Team Members/'.$row["Profile_Picture"].'"></option>';
    }
    echo '
</select>
</div>


    ';
} else {
    echo "0 results";
}  
Michael Xavier
  • 31
  • 1
  • 10

1 Answers1

0

Use css instead

echo "<option value='value' style='background-image:url(assets/img/Team Members/'.$row['Profile_Picture'].');'>Profile Name</option>'

You can take a look at this Link.

Abdoulie Kassama
  • 782
  • 10
  • 20