title: How to fetch images from database in Image gallery
body: <p>I have this format of gallery, i want to fetch gallery album images from database
  The following are code please help me I am trying this in php:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  
                                  var countries=new ddtabcontent("countrytabs")
                                  countries.setpersist(true)
                              countries.setselectedClassTarget("link") //"link" or "linkparent"
                              countries.init()
  
                          &lt;/script&gt;
  
                          &lt;!--For tab End--&gt;
                          &lt;!--&lt;textarea_autoexpand&gt;--&gt;
  
                          &lt;script type="text/javascript"&gt;
                                  $('#textarea1').autoresize();
                                  $('#textarea2').autoresize({
                                      animate: false,
                                      buffer: 2,
                                      onresize: function() {
                                          $('#message').stop(true, true).hide()
                                              .text('Resized to '+$(this).height())
                                              .fadeIn('slow', function() {
                                                  $(this).fadeOut();
                                              });
                                      }
                                  });
                          &lt;/script&gt;
  
                          &lt;!--&lt;/textarea _End&gt;--&gt;
                      &lt;/div&gt;
                  &lt;/div&gt;
                  &lt;div class="comment"&gt;
  
                      &lt;!--Stack 1  --&gt;
                      &lt;div class="image_stack" style="margin-left: 235px"&gt;
                          &lt;img id="photo1" class="stackphotos" src="images/2.jpg"&gt;
                          &lt;img id="photo2" class="stackphotos" src="images/3.jpg"&gt;
                          &lt;img id="photo3" class="stackphotos" src="images/1.jpg"&gt;
                      &lt;/div&gt;
  
                      &lt;/div&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
  </code></pre>