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. Quote Link to comment 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. Quote Link to comment 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 Quote Link to comment 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 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.