title: Show Random images from a folder without repeating using JS or PHP
body: <p>I want to show 10- 15 images from a folder in directory but I don't want to show them repeatedly. I also don't want to use MySQL Table</p>
  
  <p>Please help. </p>
  
  <p>currently i am using below code </p>
  
  <pre><code>             $imglist='';
               $img_folder = "gallerypage/small/";
  
                mt_srand((double)microtime()*1000);
  
               $imgs = dir($img_folder);
  
               while ($file = $imgs-&gt;read()) {
                   $imglist .= "$file"."|";
  
               } closedir($imgs-&gt;handle);
               $imglist = explode("|", $imglist); 
               //print_r($imglist);
               $no = sizeof($imglist)-2;
               //echo $no;
  
               for ($i=0; $i&lt;=$no; $i++)
               {
               $random = $i; // mt_rand($i, $no/$i);
               //echo $random;
               $fileb = 
               $image = $imglist[$i];
               $fileb = $image; 
                   if($image != '.' &amp;&amp; $image != '..' &amp;&amp; $image != 'Thumbs.db' )
                   {
  
                      //echo '&lt;img src="'.$img_folder.$image.'" border=0&gt;';
                      //if($image != ""){
                       //echo "k".$image."k";
                      echo "&lt;a href='".$img_folderb.$fileb."' rel='lightbox-journey'&gt;&lt;img src='".$img_folder.$image."' title='".$image."' alt='".$image."'   height='100'/&gt;";
                      //}
                   }
               }
  </code></pre>