title: PHP Iterate Through Associative Array and Get Specific Values
body: <p>I have the following associative array: </p>
  
  <pre><code>&lt;? $group_array;
  </code></pre>
  
  <p>Which outputs the following:</p>
  
  <pre><code>Array
  (
  [user_id] =&gt; Array
      (
          [0] =&gt; 594
          [1] =&gt; 597
      )
  
  [user_first] =&gt; Array
      (
          [0] =&gt; John
          [1] =&gt; Jane
      )
  
  [user_last] =&gt; Array
      (
          [0] =&gt; Smith
          [1] =&gt; Jones
      )
  
  )
  </code></pre>
  
  <p>My question is: How can I iterate through the array and output the specific values by it's name?  </p>
  
  <p>For instance, something like:</p>
  
  <pre><code>&lt;?php
     foreach ($group_array as $key =&gt; $value) {
         print($key['user_id']);
         print($key['user_first']);
         // etc...
     }
  </code></pre>
  
  <p>But this doesn't appear to work.  Any help on this would be great.  Thanks!</p>