javascript - How to loop row every three columns with Bootstrap and PHP? -


i want output images php sample gallery. every row should have 3 images, it's not working, shows 1 column.

my code:

<?php $sql5 = "select * offers order id desc"; $result5 = $conn->query($sql5); if ($result5->num_rows > 0) {     while ($row = $result5->fetch_assoc()) {         $imglink = $row["imgpath"];         $imglink2 ="upload/". $imglink;         ?>         <div class="row">             <div class="col-md-4">             <?php             echo '<img id="img" class="img-responsive" src="'.$imglink2.'">';             ?>             </div>         </div>         <?php     } } else {     echo "0 results"; } $conn->close(); ?> 


Comments

Popular posts from this blog

resizing Telegram inline keyboard -

command line - How can a Python program background itself? -

php - "cURL error 28: Resolving timed out" on Wordpress on Azure App Service on Linux -