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 Link to comment https://forums.phpfreaks.com/topic/143093-creating-php-calendar/ Share on other sites More sharing options...
gish Posted February 4, 2009 Author Share Posted February 4, 2009 bump anyone Link to comment https://forums.phpfreaks.com/topic/143093-creating-php-calendar/#findComment-754049 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.