title: Parsing JSON Url with an Array Response
body: <p>I'm running this code in php:</p>
  
  <pre><code>$jsonData   = file_get_contents('https://maps.googleapis.com/maps/api/geocode/json?address=306%20Evarts%20St%20NE%20Washington,%20DC%2020002&amp;key=&lt;hidden&gt;');
  $data = json_decode($jsonData, true);
  var_dump($data);
  </code></pre>
  
  <p>with the following result (reformatted to be readable):</p>
  
  <pre><code>array(2) {
      ["results"] =&gt; array(1) {
          [0] =&gt; array(5) {
              ["address_components"] =&gt; array(7) {
                  [0] =&gt; array(3) {
                      ["long_name"] =&gt; string(3) "306"
                      ["short_name"]=&gt; string(3) "306"
                      ["types"] =&gt; array(1) {
                          [0]=&gt; string(13) "street_number"
                      }
                  }
                  [1] =&gt; array(3) {
                      ["long_name"] =&gt; string(23) "Evarts Street Northeast"
                      ["short_name"] =&gt; string(12) "Evarts St NE"
                      ["types"] =&gt; array(1) {
                          [0]=&gt; string(5) "route"
                      }
                  }
                  [2] =&gt; array(3) {
                      ["long_name"] =&gt; string(20) "Northeast Washington"
                      ["short_name"] =&gt; string(20) "Northeast Washington"
                      ["types"] =&gt; array(2) {
                          [0] =&gt; string(12) "neighborhood"
                          [1] =&gt; string(9) "political"
                      }
                  }
                  [3] =&gt; array(3) {
                      ["long_name"] =&gt; string(10) "Washington"
                      ["short_name"]=&gt; string(4) "D.C."
                      ["types"]=&gt; array(2) {
                          [0]=&gt; string(8) "locality"
                          [1]=&gt; string(9) "political"
                      }
                  }
                  [4]=&gt; array(3) {
                      ["long_name"]=&gt; string(20) "District of Columbia"
                      ["short_name"]=&gt; string(2) "DC"
                      ["types"]=&gt; array(2) {
                          [0]=&gt; string(27) "administrative_area_level_1"
                          [1]=&gt; string(9) "political"
                      }
                  }
                  [5]=&gt; array(3) {
                      ["long_name"]=&gt; string(13) "United States"
                      ["short_name"]=&gt; string(2) "US"
                      ["types"]=&gt; array(2) {
                          [0]=&gt; string(7) "country"
                          [1]=&gt; string(9) "political"
                      }
                  }
                  [6]=&gt; array(3) {
                      ["long_name"]=&gt; string(5) "20002"
                      ["short_name"]=&gt; string(5) "20002"
                      ["types"]=&gt; array(1) {
                          [0]=&gt; string(11) "postal_code"
                      }
                  }
              }
              ["formatted_address"]=&gt; string(54) "306 Evarts Street Northeast, Washington, DC 20002, USA"
              ["geometry"]=&gt; array(3) {
                  ["location"]=&gt; array(2) {
                      ["lat"]=&gt; float(38.9248059)
                      ["lng"]=&gt; float(-77.001318)
                  }
                  ["location_type"]=&gt; string(7) "ROOFTOP"
                  ["viewport"]=&gt; array(2) {
                      ["northeast"]=&gt; array(2) {
                          ["lat"]=&gt; float(38.926154880291)
                          ["lng"]=&gt; float(-76.999969019709)
                      }
                      ["southwest"]=&gt; array(2) {
                          ["lat"]=&gt; float(38.923456919708)
                          ["lng"]=&gt; float(-77.002666980292)
                      }
                  }
              }
              ["place_id"]=&gt; string(27) "ChIJvysMWvjHt4kRjif4nyaEb7U"
              ["types"]=&gt; array(1) {
                  [0]=&gt; string(14) "street_address"
              }
          }
      }
      ["status"]=&gt; string(2) "OK"
  }
  </code></pre>
  
  <p>How can I echo various values in the results for example <code>long_name</code> of address components?</p>