holla guys
i am midst of creating a php web apps where it allows admin to tick who have attended class.
i have following data on database
semester start date, semester end date, class day and time
for example,
5 March 2012, 9th April 2012 Monday{9,12},Thursday{14,17}
I can get total weeks based start and end date. Now the problem lies on how do i get the date which classes suppose to be, like on Monday, it suppose to be 9th, but on thursday? dynamically.
Is there any php classes or any approach?
Thanks alot
Do NOT implement date functions yourself, there are a lot of pitfalls when handling dates. You can use strtotime to iterate through the dates by using strings like:
strtotime("next Thursday", yourdate)