Tutorial Calendar Function
function build_calendar($month,$year,$dateArray) { // Create array containing abbreviations of days of week. $daysOfWeek = array(...
https://iskablogs.blogspot.com/2014/03/tutorial-calendar-function.html
function build_calendar($month,$year,$dateArray) {
// Create array containing abbreviations of days of week.
$daysOfWeek = array('S','M','T','W','T','F','S');
// What is the first day of the month in question?
$firstDayOfMonth = mktime(0,0,0,$month,1,$year);
// How many days does this month contain?
$numberDays = date('t',$firstDayOfMonth);
//