' . $date['month'] . ''; for ($i = 0; $i < 6; $i++) { print ''; for ($j = 1; $j <= 7; $j++) { $dayNum = $j + $i*7 - $date['wday']; //Print a cell with the day number in it. If it is today, highlight it. print ' 0 && $dayNum <= $dayTotal) { print ($dayNum == $now['mday']) ? ' style="background: maroon;">' : '>'; print $dayNum; } else { //Print a blank cell if no date falls on that day, but the row is unfinished. print '>'; } print ''; } print ''; if ($dayNum >= $dayTotal && $i != 6) break; } print ''; ?>