PHP function for Reverse Geocoding for street number
<p>The following code <a href="https://stackoverflow.com/questions/12810654/php-latitude-longitude-to-address/34627450#34627450">from this post</a> is working for me, but it is returning the full address (Street Number, Street Name, City, State, Zip Code, Country). Is there a way to get it to only return the street number and name instead of the full address? Google hasn't been much help.</p>

<pre><code>&lt;?
  function getaddress($lat,$lng)
  {
     $url = 'http://maps.googleapis.com/maps/api/geocode/json?latlng='.trim($lat).','.trim($lng).'&amp;sensor=false';
     $json = @file_get_contents($url);
     $data=json_decode($json);
     $status = $data-&gt;status;
     if($status=="OK") {
       return $data-&gt;results[0]-&gt;formatted_address;
     } else {
       return false;
     }
  }

  $lat= 26.754347; //latitude
  $lng= 81.001640; //longitude
  $address= getaddress($lat,$lng);
  if($address) {
    echo $address;
  } else {
    echo "Not found";
  }
?&gt;
</code></pre>