displaying dates between two date range

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
pez
Forum Newbie
Posts: 2
Joined: Mon Sep 08, 2008 5:22 am

displaying dates between two date range

Post by pez »

Hi,

I'd like to display all the dates between two date range.

For example:

from: 2008-01-01 To: 2008-03-30

I want the code to display:

2008-01-01
2008-01-02
2008-01-03
2008-01-04
...
...
....
...
2008-03-29
2008-03-30


Thanks
User avatar
onion2k
Jedi Mod
Posts: 5263
Joined: Tue Dec 21, 2004 5:03 pm
Location: usrlab.com

Re: displaying dates between two date range

Post by onion2k »

This forum is not a resource where you can just ask for things to be written and expect something decent to be posted. We are not here to do work for nothing. We'll happily help you fix any problems, or help you if you're stuck, but that doesn't go as far as writing the entire code.

Think of it like this - we will match the effort you put in. If you put no effort into your code then neither will we. If you put a lot of effort into finding a solution then so will we. That way everyone is happy.

So if you want some help, post what code you've written so far, or at least what ideas you've had as you've researched the problem, and we'll take it from there.
pez
Forum Newbie
Posts: 2
Joined: Mon Sep 08, 2008 5:22 am

Re: displaying dates between two date range

Post by pez »

I figured it out.

Thanks for nothing.
Post Reply