MikeDXUNL Posted October 31, 2008 Share Posted October 31, 2008 $today = getdate(); echo $today['month']; // October echo $today['month']+1; // 1 how can I advance a month? Thanks in advance. Link to comment https://forums.phpfreaks.com/topic/130902-solved-calendar/ Share on other sites More sharing options...
akitchin Posted October 31, 2008 Share Posted October 31, 2008 $today['mon'] + 1 thank the php manual for a speedy resolution to this. it's free, you know. Link to comment https://forums.phpfreaks.com/topic/130902-solved-calendar/#findComment-679479 Share on other sites More sharing options...
MikeDXUNL Posted October 31, 2008 Author Share Posted October 31, 2008 i need the Month text to advance. not the numerical month value Link to comment https://forums.phpfreaks.com/topic/130902-solved-calendar/#findComment-679515 Share on other sites More sharing options...
kenrbnsn Posted October 31, 2008 Share Posted October 31, 2008 I would use date() and strtotime(): <?php $month = date('F'); $next_month = date('F',strtotime('+1 month')); echo $month . " ... " . $next_month; ?> Ken Link to comment https://forums.phpfreaks.com/topic/130902-solved-calendar/#findComment-679559 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.