i need to write a script that will allow the user to enter a starting date, and the number of weeks. The script (when run with the post data) will then produce the dates for the weeks and the start date that were entered. So, for example, if the user enters
Starting date: 11/07/2004
Weeks: 24
The resulting output will be:
11/07/04 - 11/13/04
11/14/04 - 11/20/04
11/21/04 - 11/27/04
11/28/04 - 12/04/04
12/05/04 - 12/11/04
12/12/04 - 12/18/04
12/19/04 - 12/25/04
12/26/04 - 01/01/05
01/02/05 - 01/08/05
01/09/05 - 01/15/05
01/16/05 - 01/22/05
01/23/05 - 01/29/05
01/30/05 - 02/05/05
02/06/05 - 02/12/05
02/13/05 - 02/19/05
02/20/05 - 02/26/05
02/27/05 - 03/05/05
03/06/05 - 03/12/05
03/13/05 - 03/19/05
03/20/05 - 03/26/05
03/27/05 - 04/02/05
04/03/05 - 04/09/05
04/10/05 - 04/16/05
04/17/05 - 04/23/05
I think it will have something to do with these functions:
date - http://www.php.net/manual/en/function.date.php
mktime - http://www.php.net/manual/en/function.mktime.php
strtotime - http://www.php.net/manual/en/function.strtotime.php
Thanks!