Canman2005 Posted March 14, 2008 Share Posted March 14, 2008 Hi all I have a simple script to print all months since a defined date, the code is $startdate = "1 december 2007"; 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 prints something like December 2007 January 2008 February 2008 March 2008 Is it possible to list all the days in each month under the month, so for example December 2007 1 2 3 4 5 6 7 .etc. January 2008 1 2 3 4 5 6 7 .etc. is this possible? cheers ed Quote Link to comment Share on other sites More sharing options...
l0ve2hat3 Posted March 14, 2008 Share Posted March 14, 2008 look at the cal_days_in_month fuction http://us2.php.net/de/cal_days_in_month Quote Link to comment Share on other sites More sharing options...
l0ve2hat3 Posted March 14, 2008 Share Posted March 14, 2008 oops wrong language http://us2.php.net/en/cal_days_in_month Quote Link to comment Share on other sites More sharing options...
dbillings Posted March 14, 2008 Share Posted March 14, 2008 check out this link http://keithdevens.com/software/php_calendar Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.