title: Random selection from sub array
body: <p>I need to select a random item (img1, img2, etc.) from simple nested arrays. I'm sure this is easy but I am stumped. The array has this format:</p>
  
  <pre><code>Array
  (
     [0] =&gt; Array
          (
              [homepage_image] =&gt; img1
          )
  
      [1] =&gt; Array
          (
              [homepage_image] =&gt; img2
          )
  
  )
  </code></pre>
  
  <p>$fields is the name of the main array.
  I've tried using:</p>
  
  <pre><code>$random = array_rand($fields);
  </code></pre>
  
  <p>But of course that just gives me 0 or 1. How do I randomly get img1, img2, etc?</p>