I'm dummy and dont know how to compare date's. I need to do link unclickable when date is less or equal today. This is actullay not complete code, full code prints this week monday to sunday. Im try to do calendar what print 1 week each time and each day it print time 9am to 17pm.
$toDay = date("m-d-y");
$first = date('m-d-Y', strtotime('Last Monday +'.$d.' days'));
//This sunday + 1 week
$last = date('m-d-Y', strtotime('Next Sunday +'.$d.' days'));
//print week number
**if($first <= $toDay() && $tomorrow <= $toDay)**
{
echo"<p class='list_header'>". $tomorrow."</p>";
//Looping time 9 to 17
for($time_start = 9; $time_start <= 17; $time_start+=2)
{
echo "<li style='background-color:red'><a href='#'>".$time_start."</a></li>";
}
}
You can use timestamp method to compare the time value in php.