<?php
$tourAvaibilityDate = array (
'tour_avaibility' =>
array (
'tour_avaibility_location' =>
array (
'Location_one' => 'Location_two',
'Location_seven' => 'Location_nine'
),
'tour_avaibility_date' =>
array (
'02/11/2020' => '02/17/2020',
'02/21/2020' => '02/26/2020'
)
)
);
$tours = $tourAvaibilityDate['tour_avaibility'];
$start_locations = array_keys($tours['tour_avaibility_location']);
$end_locations = array_values($tours['tour_avaibility_location']);
$start_dates = array_keys($tours['tour_avaibility_date']);
$end_dates = array_values($tours['tour_avaibility_date']);
$c = count($start_locations);
for ($i = 0; $i < $c; $i++) {
echo $start_locations[$i] . ' - ' . $end_locations[$i] . "\n";
echo $start_dates[$i] . ' - ' . $end_dates[$i] . "\n";
}
- Output for 7.2.0 - 7.2.33, 7.3.0 - 7.3.33, 7.4.0 - 7.4.33, 8.0.0 - 8.0.30, 8.1.0 - 8.1.31, 8.2.0 - 8.2.27, 8.3.0 - 8.3.15, 8.4.1 - 8.4.2
- Location_one - Location_two
02/11/2020 - 02/17/2020
Location_seven - Location_nine
02/21/2020 - 02/26/2020
preferences:
139.83 ms | 407 KiB | 5 Q