for($i = 1; $i <= $numDays; $i++)
{
echo "<th scope='col' id='CalendarTableHeader' style='text-align:center;'>".$i."</th>";
}
I did not find $numDays
variable in your TableHeader
function.
function TableHeader($week, $month, $year, $numDays) {
// Your code here
}
I think it should be
$numDays = monthDays($month, $year);
if(isset($_GET['week'])){
$week = $_GET['week'];
TableHeader($week, $month, $year, $numDays);
}