Click to See Complete Forum and Search --> : php date list for specified duration


imin
March 25th, 2010, 05:15 AM
hi

is there any php classes or functions, which will gives us all the days from specific duration? for example, if i want a list of dates from 25/03/2010 (25th march 2010) to 15/05/2010 (15th May 2010), it will give me:

25/03/2010
26/03/2010
26/03/2010
....
....
....
14/05/2010
15/05/2010

thanks a lot for any help!

PeejAvery
March 25th, 2010, 08:56 AM
Use date() and strtotime(). Start with your first date and then just keep adding 1 day until you have it. All it takes are those two functions and a for loop.