Reputation: 2501
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?
Upvotes: 0
Views: 36
Reputation: 8970
I guess you have mismatched it. Try this -
$json->results[0]->geometry->location->lat;
Upvotes: 1