title: How can I fetch all the array of images from folder using explode function?
body: <p><strong>I am able to fetch only first image of every row of database.How can I fetch all the images using prepared statement and explode function.</strong> </p>
  
  <pre><code>&lt;form method="POST" enctype="multipart/form-data"&gt;
       &lt;?php 
       $sql="select property_img from img_tbl";
  
           $q=$conn-&gt;query($sql);
             if($q-&gt;num_rows&gt;0)
             {
               while($r1=$q-&gt;fetch_assoc())
             {
                  $property_img1=$r1['property_img'];
               $property_img2=explode(' ',$property_img1);
  
  
              echo '
  
           &lt;div id="shade"&gt;
           &lt;div class="col-sm-12 " id="color"&gt;
           &lt;div class="col-sm-4 form-group"&gt;    
  
           &lt;div class="row fppadd"&gt; ';
  
           ?&gt;
  
            &lt;?php
              foreach($property_img2 as $data){
  
              echo  '&lt;img class="img-zoom" src="uploads/' . $data . '" width="200" height="150" alt="not fetched"&gt;&amp;nbsp;&amp;nbsp;';
              }
  
              ?&gt; 
               &lt;br&gt;&lt;/a&gt;&lt;/span&gt;&lt;br&gt;
           &lt;/div&gt;
          &lt;/div&gt;
  
  
  
        &lt;/div&gt;
  
        &lt;/div&gt; &lt;?php
             }
             }?&gt;       
             &lt;br&gt; 
  
  
  
  
  
  
        &lt;/form&gt;
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/0mCkP.png" rel="nofollow noreferrer">uploads folder structure of images</a></p>
  
  <p><a href="https://i.stack.imgur.com/RCFWd.jpg" rel="nofollow noreferrer">Images are saved in database in this format.I want to fetch these images</a></p>