title: Displaying image from database with bootstrap
body: <p>My code for the picture below is this:</p>
  
  <pre><code>&lt;div class="container"&gt;
      &lt;div class="row"&gt;
          &lt;div class="col-md-4 col-xs-6"&gt;
              &lt;img src="images/1.jpg" class="img-responsive img-thumbnail"&gt;
          &lt;/div&gt;
           &lt;div class="col-md-4 col-xs-6"&gt;
              &lt;img src="images/1.jpg" class="img-responsive img-thumbnail"&gt;
          &lt;/div&gt;
           &lt;div class="col-md-4 col-xs-6"&gt;
              &lt;img src="images/1.jpg" class="img-responsive img-thumbnail"&gt;
          &lt;/div&gt;
           &lt;div class="col-md-4 col-xs-6"&gt;
              &lt;img src="images/1.jpg" class="img-responsive img-thumbnail"&gt;
          &lt;/div&gt;
          &lt;div class="col-md-4 col-xs-6"&gt;
              &lt;img src="images/1.jpg" class="img-responsive img-thumbnail"&gt;
          &lt;/div&gt;
          &lt;div class="col-md-4 col-xs-6"&gt;
              &lt;img src="images/1.jpg" class="img-responsive img-thumbnail"&gt;
          &lt;/div&gt;
          &lt;div class="col-md-4 col-xs-6"&gt;
              &lt;img src="images/1.jpg" class="img-responsive img-thumbnail"&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/S60rW.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/S60rW.png" alt="enter image description here"></a></p>
  
  <p>I think it's okay to do it like that if the images are not called from the database. So my problem is, if i had several images in the database(MySQL) and want to call and display it as in the picture, what is the effective way to display them other than having to repeat the same code over and over. Am using bootstrap 3.3.7. Beginner here and would really appreciate some guidance, thanks. </p>