stevewhea — 2012-11-11T04:22:49-05:00 — #1
I'm writing a booking program and when someone creates a class that starts on a specific date and time I want to be able
to specificy that the class my run every mon, tues, wed at the same time each week for say 5 weeks.
I have the time stamp for the start time, but how would I get it for say next monday at 19:00 and the following monday and so on
cups — 2012-11-11T10:34:59-05:00 — #2
Start by looking at the DateTime class, especially DateInterval, but be very careful that your PHP version matches the functionality you want on all servers. This class and its associates arrived in waves through version 5.2 onwards, IIRC.
We used to do this kind of work with strtotime(), but these classes seem to be built on the same functionality.