'; echo ' '.$today['month']." - ".$today['year'].""; echo ''; echo ' MoTuWeTh'; echo ' FrSaSu'; // Display the first calendar row with correct positioning echo ''; for($i=1;$i<$firstDay['wday'];$i++){ echo ' '; } $actday = 0; for($i=$firstDay['wday'];$i<=7;$i++){ $actday++; if ($actday == $today['mday']) { $class = ' class="actday"'; } else { $class = ''; } echo "$actday"; } echo ''; //Get how many complete weeks are in the actual month $fullWeeks = floor(($lastDay['mday']-$actday)/7); for ($i=0;$i<$fullWeeks;$i++){ echo ''; for ($j=0;$j<7;$j++){ $actday++; if ($actday == $today['mday']) { $class = ' class="actday"'; } else { $class = ''; } echo "$actday"; } echo ''; } //Now display the rest of the month if ($actday < $lastDay['mday']){ echo ''; for ($i=0; $i<7;$i++){ $actday++; if ($actday == $today['mday']) { $class = ' class="actday"'; } else { $class = ''; } if ($actday <= $lastDay['mday']){ echo "$actday"; } else { echo ' '; } } echo ''; } echo ''; } showCalendar(); ?>

 

Website being worked on.
My status