title: Get images one by one from directory
body: <p>in php i want to ask how to get images one by one from folder directory and display in the jquery slider i have tried this php code by it's not working as i want?</p>
  
  <pre><code> &lt;ul class="jcarousel-list"&gt;
   &lt;li class="jcarousel-item"&gt;
   &lt;?php 
   $directory = "data/uploads/topslider/";
   if (glob($directory . "*") != false)
   {
     $filecount = count(glob($directory . "*"));
   }
   else
   {
   } 
   $files_index = glob("data/uploads/"."top"."slider/*.*");
   for ($i=0; $i&lt;$filecount; $i++)
   {
     $num2 = $files_index[$i];
   ?&gt;
   &lt;img src="&lt;?php echo $num2;?&gt;" width="50" height="50" alt="" /&gt; &lt;? 
   }?&gt;&lt;/li&gt;
   &lt;/ul&gt;
  </code></pre>
  
  <p>i want display like this:</p>
  
  <p><strong>Image1 Imag2 Image3......and So On from single folder or directory</strong></p>