0

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?

1
  • 1
    How about $json->results[0]->geometry->location->lat; Commented Apr 9, 2014 at 21:15

1 Answer 1

1

I guess you have mismatched it. Try this -

$json->results[0]->geometry->location->lat;
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.