title: display random image url from folder
body: <p>I have a php code which uses every image in a folder and echos the url on my page.</p>
  
  <p>what i need help with is making the php code randomize the list of urls each time the page is loaded.</p>
  
  <p>The code that i have is:</p>
  
  <pre><code>&lt;?php 
   if ($handle = opendir('images')) {
     while (false !== ($file = readdir($handle)))
        {
            if ($file != "." &amp;&amp; $file != "..")
        {
              $thelist .= '&lt;div data-delay="5"&gt;&lt;img src="images/'.$file.'"&gt;&lt;/div&gt;';
            }
         }
    closedir($handle);
    }
  ?&gt;
  &lt;?=$thelist?&gt;
  </code></pre>
  
  <p>many thanks</p>