1
How do I get the given 'distance' in JSON in this example?
$url = "https://maps.googleapis.com/maps/api/distancematrix/json?units=imperial&origins=86015-810&destinations=86830-000&key=AIzaSyDL6_dJ-Mbi_03_g6lHhWibxY22Z2UeYZQ";
$json = file_get_contents($url);
$json_data = json_decode($json, true);
echo $json_data["text"];
Thanks a lot! It worked :D
– João Pedro Morais