adam291086 Posted December 6, 2007 Author Share Posted December 6, 2007 ok i have made my calendar by finding out how many days are in the current month, via $numdaysinmonth = cal_days_in_month( CAL_GREGORIAN, $thismonth, $thisyear ); . I then print the current number when the counter is <=$numdaysinmonth. Is this a bad design? Quote Link to comment Share on other sites More sharing options...
adam291086 Posted December 6, 2007 Author Share Posted December 6, 2007 you can see what is happening here http://www.adamplowman.co.uk/cycling/calendar/adam.php Quote Link to comment Share on other sites More sharing options...
adam291086 Posted December 6, 2007 Author Share Posted December 6, 2007 ok i am starting to use mktime for my next and previou buttons. SO far i have this $thisyear = mktime("$thisyear")-1; when i echo this year i get 1204125826 How do i turn that into 2008 for example? Quote Link to comment Share on other sites More sharing options...
PHP_PhREEEk Posted December 6, 2007 Share Posted December 6, 2007 Use date() with mktime() as the second parameter. Read the examples and user comments at php.net for both. PhREEEk 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.