title: Output random entry from PHP array
body: <p>I'm trying to output a random selection of items stored in an array. There are three different arrays, and I want to output four items from each one. So 12 words to appear on the page.</p>
  
  <p>Here is an example of the live site. Where you see the white squares, they're supposed to be words but I can't get it working: <a href="http://francesca-designed.me/create-a-status/" rel="nofollow">http://francesca-designed.me/create-a-status/</a></p>
  
  <p>I have three arrays with 20 words each:</p>
  
  <pre><code>&lt;?php
  $poolOne=array("sparkly","sporty","happy","confident","awesome","funny","awkward","mad","silly","dynamic",
  "handsome","merry","horrid","funky","loud","chirpy","posh","clever","pretty","athletic");
  shuffle($poolOne);
  
  $poolTwo=array("pink","purple","melon","lemon","lime","red","blue","peach","rouge","green",
  "ginger","blonde","brown","yellow","gold","violet","rainbow","maroon","indigo","silver");
  shuffle($poolTwo);
  
  $poolThree=array("zebra","lion","tiger","fish","ktten","butterfly","octopus","squid","puppy","bug",
  "spider","cat","hamster","newt","frog","monkey","dog","rabbit","pig","sheep");
  shuffle($poolThree);
  ?&gt;
  </code></pre>
  
  <p>I've attempted to use <code>shuffle()</code> to shuffle up the numbers, and then call them out into my <code>span</code> randomly:</p>
  
  <pre><code>&lt;div class="words one"&gt;
      &lt;span&gt;&lt;?php for($i=0;$i&lt;4;$i++) {echo $poolOne[$i];} ?&gt;&lt;/span&gt;
      &lt;span&gt;&lt;?php for($i=0;$i&lt;4;$i++) {echo $poolOne[$i];} ?&gt;&lt;/span&gt;
      &lt;span&gt;&lt;?php for($i=0;$i&lt;4;$i++) {echo $poolOne[$i];} ?&gt;&lt;/span&gt;
      &lt;span&gt;&lt;?php for($i=0;$i&lt;4;$i++) {echo $poolOne[$i];} ?&gt;&lt;/span&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I'm guessing this is not correct, or that I've done something wrong.</p>
  
  <p>Ultimately I need to iterate through each array and output a random 4 into the spans.</p>