0

Possible Duplicate:
how to find the dates between two dates specified

I want to get todays date and the following 6 days. I wish to display it as an html list. So say today date is the 1st October I would like to return.

<ul>
        <li>01/10/2011</li>
        <li>02/10/2011</li>
        <li>03/10/2011</li>
        <li>04/10/2011</li>
        <li>05/10/2011</li>
        <li>06/10/2011</li>
        <li>07/10/2011</li>
</ul>
Community
  • 1
  • 1
Keith
  • 1

1 Answers1

0

From the PHP Documentation:

It is possible to use date() and mktime() together to find dates in the future or the past.

<?php
$tomorrow  = mktime(0, 0, 0, date("m")  , date("d")+1, date("Y"));
$lastmonth = mktime(0, 0, 0, date("m")-1, date("d"),   date("Y"));
$nextyear  = mktime(0, 0, 0, date("m"),   date("d"),   date("Y")+1);
?>

See here.

Lukas Knuth
  • 25,449
  • 15
  • 83
  • 111