Jump to content

List next 7 days and months


Canman2005

Recommended Posts

Hi all

 

I wonder if you can help.

 

I have this code

 

$startdate = "10 october 2009";

function printMonths($var)
{
$start = strtotime($var);
$now = strtotime("Now");
while ($start < $now)
{
echo date("F Y", $start);
echo "<br>";
$start = strtotime("+1 month", $start);
}
}
printMonths($startdate);

 

which works fine and gives me

 

October 2009

November 2009

 

but is it possible, to list the next 12 months and inbetween each month also list each day of that month?

 

thanks everyone

 

dave

Link to comment
https://forums.phpfreaks.com/topic/182921-list-next-7-days-and-months/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.