0
I am using, in PHP this code to recover the address, is returning me normally, what I need is to recover only the name of the city, have as?
$lat =$_POST['latitude'];
$long =$_POST['longitude'];
$address=file_get_contents("http://maps.googleapis.com/maps/api/geocode/json?latlng=$lat,$long&sensor=true");
$json_data=json_decode($address);
$full_address=$json_data->results[0]->formatted_address;
echo $full_address;