Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- array (
- 'routes' =>
- array (
- 0 =>
- array (
- 'legs' =>
- array (
- 0 =>
- array (
- 'summary' => '',
- 'weight' => 3741.9,
- 'duration' => 2912.3, // This value is what i want access
- 'steps' =>
- array (
- ),
- 'distance' => 21603.1, // This value is what i want access
- ),
- 1 =>
- array (
- 'summary' => '',
- 'weight' => 3642.1,
- 'duration' => 2777.4, // This value is what i want access
- 'steps' =>
- array (
- ),
- 'distance' => 21611.8, // This value is what i want access
- ),
- ),
- 'weight_name' => 'routability',
- 'weight' => 7384,
- 'duration' => 5689.700000000001, // This value i can acesss
- 'distance' => 43214.899999999994, // This value i can acesss too
- ),
- ),
- 'waypoints' =>
- array (
- 0 =>
- array (
- 'hint' => '',
- 'distance' => 16.78277948979663, // This value is what i want access
- 'name' => 'Weg',
- 'location' =>
- array (
- 0 => 11.4623,
- 1 => 50.7126,
- ),
- ),
- 1 =>
- array (
- 'hint' => '',
- 'distance' => 16.62835508134535,
- 'name' => 'Weg',
- 'location' =>
- array (
- 0 => 12.6069,
- 1 => 51.5398,
- ),
- ),
- 2 =>
- array (
- 'hint' => '',
- 'distance' => 16.78277948979663,
- 'name' => 'Weg',
- 'location' =>
- array (
- 0 => 12.343,
- 1 => 51.576,
- ),
- ),
- ),
- 'code' => 'Ok',
- )
- foreach($res2['routes'] as $item)
- {
- $distances = array_push_assoc($distances, $item['distance'], $item['duration']);
- }
- foreach($res2['routes']['legs'] as $item)
- {
- $durations = array_push_assoc($durations , "DUR", $item['duration']);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement