Hi..
I need to create a drop down menu with a list of months based on the current month... for example, today's month is July - the list should be
Aug 2004
Sept 2004
Oct 2004
Nov 2004
Dec 2004
Jan 2005
Feb 2005
Apr 2005
May 2005
Jun 2005
July 2005
Aug 2005
Sept 2005
Oct 2005
Nov 2005
Dec 2005
Jan 2006
Feb 2006
Apr 2006
May 2006
Jun 2006
So basically I need to list the 10 months before and after the current date.
here's the code I have so far
#if months and years have been sent, use those, otherwise get TODAYs month
if (!$month) { $month = date("m",time()); }
if (!$year) { $year = date("Y",time()); }
$months_names = array(); #used to store the dates
for ($x=12;$x>($month-10);$x--) {
#put past months here
}
I just dont know how to actually get the details thought! any help is much appreciated!!