Вопрос

Here is the sample JSON output I am working with:

http://maps.google.com/maps/api/geocode/json?components=postal_code:90210&sensor=false

Here is the attempt to pull the latitude value from this location:

$postalLong = $jsonOutput>results[0]->formatted_address[0]->location[1]->lng;   

I have tried several variations but it is not working. How can I have this apply the 34.1030032 value to this variable?

Это было полезно?

Решение

I guess you have mismatched it. Try this -

$json->results[0]->geometry->location->lat;
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top