0
私はちょっと固まっています。なぜ私のコードで緯度と経度を抜かないのですか? 私は欠陥を見ることができません。前もって感謝します!Google APIの多次元配列
$json = file_get_contents('https://maps.googleapis.com/maps/api/geocode/json?address=Boston');
$result = json_decode($json, true);
$glat = $result->{'results'}[0]->{'geometry'}->{'location'}->{'lat'};
$glong = $result->{'results'}[0]->{'geometry'}->{'location'}->{'lng'};
print $glat.",".$glong;
+0