0

I run a php script which returns coordinates in an array. However, I am struggling to store the individual values for longitude and latitude.

The actual output using var_dump is:

array(2) { ["latitude"]=> float(53.545858) ["longitude"]=> float(10.0079285) }

Any help is highly appreciated since I am a beginner with regards to php.

3
  • 1
    What have you tried? Show some code on what you are doing. Commented Jun 6, 2019 at 18:48
  • 1
    But why? Just use the array as intended. Commented Jun 6, 2019 at 19:19
  • you can you extract() function link Commented Jun 7, 2019 at 7:06

1 Answer 1

1

If you want to store them in variables $longitude and $latitude, This should work.

    $longitude = $array["longitude"];
    $latitude = $array["latitude"];
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.