I want to display this array value in dropdown using PHP with output like this 10:00 AM to 10:30 AM. The array below is the output of slots. I want to display start time and end time per list in dropdown.
$slots = getTimeSlot(30, ’10:00′, ’13:00′);
Array
(
[1] => Array
(
[slot_start_time] => 10:00
[slot_end_time] => 10:30
)
[2] => Array
(
[slot_start_time] => 10:30
[slot_end_time] => 11:00
)
[3] => Array
(
[slot_start_time] => 11:00
[slot_end_time] => 11:30
)
[4] => Array
(
[slot_start_time] => 11:30
[slot_end_time] => 12:00
)
[5] => Array
(
[slot_start_time] => 12:00
[slot_end_time] => 12:30
)
[6] => Array
(
[slot_start_time] => 12:30
[slot_end_time] => 13:00
)
)
<select name="time" id="time">
<option value=""></option>
</select>