I'm trying to find examples of properly looping through a range of dates to insert information.
Currently, I am creating a schedule row with the user, location etc., and a single date in a form using:
But I would like to add start and end date and create identical row information (user, location, etc.), looping through each date in the range, and stopping after the end date is inserted. Assuming two dates would be something like:
I found some examples with messy PHP, but I'm assuming there is a more 'eloquent' way to do this. Any help would be greatly appreciated.