title: Getting the Altitude / Elevation from Google Maps address with the Elevation API
body: <p>Im trying the echo the elevation of an address in PHP.
  I am using the Google Elevation API - <a href="https://developers.google.com/maps/documentation/elevation/intro" rel="nofollow noreferrer">LINK</a></p>
  
  <p>I already have the latitude and longitude.
  The following link:</p>
  
  <p><code>https://maps.googleapis.com/maps/api/elevation/json?locations=40.7143528,-74.0059731&amp;key=myapikey</code></p>
  
  <p>will produce these results in json:</p>
  
  <p><code>{
     "results" : [
        {
           "elevation" : 9.774918556213379,
           "location" : {
              "lat" : 40.7143528,
              "lng" : -74.00597310000001
           },
           "resolution" : 19.08790397644043
        }
     ],
     "status" : "OK"
  }</code></p>
  
  <p>How can I echo the elevation?
  something like <code>&lt;?php echo 'elevation'; ?&gt;</code></p>
  
  <p>Thank you</p>