usgeocoder->address_info; $geo_info=$response->usgeocoder->geo_info; $resp = array(); //geo Info if ($geo_info->geo_status == 'Match Found') { $latitude = $geo_info->latitude; $longitude = $geo_info->longitude; $resp['geo_info'] = array( "status_code" => 200, "status" => "success", "latlong" => array("Latitude" => $latitude , "Longitude" => $longitude), ); } else { $resp['geo_info'] = array( "status_code" => 404, "status" => "failed", "error" => "Not Found" ); } //Address Info if ($address_info->address_status == 'Match Found') { $city = $address_info->city; $county = $address_info->county; $state = $address_info->state; $street = $address_info->street; $resp['address_info'] = array( "status_code" => 200, "status" => "success", "address" => array("city" => $city , "county" => $county, "state" => $state,"street" => $street), ); } else { $resp['address_info'] = array( "status_code" => 404, "status" => "failed", "error" => "Not Found" ); } return $resp; } } ?>