I'm looking for help in writing a script to find the next available time slot.
Ex: Person A wants an appointment and the available time slots everyday is 9am, 12pm, 4pm, 6pm, 9pm
So, I need to check existing data and compare the time slots booked for the other appointments and then find next available.
$apts = array(
'Person 1' => '1/1/09-9:00',
'Person 2' => '1/1/09-12:00',
'Person 3' => '1/1/09-18:00',
'Person 4' => '1/1/09-21:00'
);
So, I need to find next time slot for Person A against $apts, and it should come up with 4pm (1/1/09-16:00). Then comes along Person B and the next time slot for him/her should be '1/2/09-9:00', since no more time slots on 1/1/09, so go to 9am next day.
Make since? Thanks!!