title: PHP random image number not consistant
body: <p>I'm using a PHP script which gets data from a text file and displays three random images in a php page. The problem I'm having is that three images don't always show on the page :/ When refreshing the page to see the new random images, sometimes only 1 image will display, sometimes only 2, and then sometimes three. I want three random images to display always. Does anyone have any ideas what I could add to make sure three images always display? :S</p>
  
  <p>php:</p>
  
  <pre><code> &lt;?php 
   $random = "random.txt";
  $fp = file($random);
  shuffle($fp);
  $keys = array_rand($fp, 3);
  for ($i = 0; $i &lt; 3; $i++):
  $rl = $fp[$keys[$i]]; 
  echo $rl;
  endfor;
  ?&gt;
  </code></pre>
  
  <p>html: </p>
  
  <pre><code> &lt;div class="imagecontainer"&gt;
   &lt;?php include('rotate.php') ?&gt;
   &lt;/div&gt;
  </code></pre>