title: Looping through an Array in Php
body: <p>Can't seem to figure this out. I struggle so badly with arrays. I am trying to get the data out of this array and keep getting errors.</p>
  
  <p>I tried using this code below and several other attempts and failed miserably. What's the best way to remember how to do this? Everytime I don't code Php for a couple months I seem to forget everything...</p>
  
  <pre><code>  foreach( $data as $key) { 
              foreach( $key as $value =&gt; $sum) {
                echo $sum;
              } 
          }
  
  
  
  
  
  Array
      (
          [result] =&gt; OK
          [data] =&gt; Array
              (
                  [destination] =&gt; 
                  [tracking] =&gt; Array
                      (
                          [0] =&gt; Array
                              (
                                  [loc] =&gt; Array
                                      (
                                          [city] =&gt; 
                                          [territory] =&gt; ME
                                          [country] =&gt; US
                                      )
  
                                  [desc] =&gt; Delivered
                                  [stamp] =&gt; 1384977300
                                  [time] =&gt; 11/20/13 11:55 am
                                  [locStr] =&gt; ME, US
                                  [geo] =&gt; Array
                                      (
                                          [lat] =&gt; 45.253783
                                          [lon] =&gt; -69.4454689
                                      )
  
                              )
  </code></pre>