I dont know if this is possible but I want to apply a class to something based on a day of the week in PHP. The code would something like this. It is being used to show which day it is within an opening times section on a page.
<?php
$dayoftheweek=cal_to_jd(CAL_GREGORIAN,date("m"),date("d"),date("Y"));
$whatdayisit=(jddayofweek($dayoftheweek,1));
if ($whatdayisit === Monday){
// SET #monday to class open_colour
}
else if ($whatdayisit === Tuesday) {
// SET #tuesday to class open_colour
}
//.........
?>
I'm not sure if PHP is the way to do this or is there a better way with JS/JQuery...
ADDITION ****
<?php
if ($whatdayisit === Monday){
echo
<div class="opening_times_day_orange">Monday</div> <div class="opening_times_times_orange">07:30 - 23:00 </div>
}
else {
echo
<div class="opening_times_day">Monday</div> <div class="opening_times_times">07:30 - 23:00 </div>
}
?>