how to parse a Google Maps geocoding result
问题 I want to retrieve Geo address from given latitude and longitude using geocoding, using the given example on the site http://maps.googleapis.com/maps/api/geocode/json?latlng=40.714224,-73.961452&sensor=true I just need city name New York in this example and country name i.e United States. But the problem is there are more than one appearances of these words as long_name. My question how can I parse this json/xml in php to get just city name and country. $url= file_get_contents('http://maps