Split time slots between start time and end time in PHP

Creating time between start time and end time in interval of 30 Minutes in PHP

Check Result:

result: