gish Posted January 30, 2009 Share Posted January 30, 2009 I am creating a online calender, I found a small scripted pulled it apart to find out how it works. now i am trying to create a calender will show three months two months in advance. My problem is I can't the date[mon] to increment up. Does anyone know what I am doing wrong? $monthOne['mon']= $monthOne['mon']+ 1; echo $monthOne['mon']; $monthTwo['mon']= $monthOne['mon']+ 2; echo $monthTwo['mon']; // current month $today = getdate(); $firstDay = getdate(mktime(0,0,0,$today['mon'],1,$today['year'])); $lastDay = getdate(mktime(0,0,0,$today['mon']+1,0,$today['year'])); //month one $monthOne = getdate(); $monthOne['mon']= $monthOne['mon']+ 1; echo $monthOne['mon']; $monthOnefirstday = getdate(mktime(0,0,0,$monthOne['mon'],1,$monthOne['year'])); $monthOnelastDay = getdate(mktime(0,0,0,$monthOne['mon']+1,0,$monthOne['year'])); //month two $monthTwo = getdate(); $monthTwo['mon']= $monthOne['mon']+ 2; echo $monthTwo['mon']; $monthTwofirstday = getdate(mktime(0,0,0,$monthTwo['mon'],1,$monthTwo['year'])); $monthTwolastDay = getdate(mktime(0,0,0,$monthTwo['mon']+1,0,$monthTwo['year'])); Gish Quote Link to comment Share on other sites More sharing options...
gish Posted February 4, 2009 Author Share Posted February 4, 2009 bump anyone 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.