<?php

require '../config.php';

$month =
intval($_GET['month'] ?? date('m'));

$year =
intval($_GET['year'] ?? date('Y'));

$holidays=[];

$res = $conn->query("
SELECT *
FROM public_holidays
");

while($row=$res->fetch_assoc()){

    $date =
    date(
        "$year-m-d",
        strtotime(
            $row['holiday_date']
        )
    );

    $holidays[$date] =
    $row['holiday_name'];
}