I use your code and something is wrong-the tr element is not highlighted as expected,i think your code is OK, probably my syntax is somewhere wrong,Look at the code-it is short: $now = new DateTime($newdate);$today=$now->format('j m Y');$startDate = $mondayweek->modify("tomorrow")->modify("last Monday")->format('j m Y');$endDate = $mondayweek->modify("yesterday")->modify("next Sunday")->format('j m Y');if(isset($_GET['month'])) {echo '<tr class="monthgreen" >';} elseif (isset($_GET['weekview'])) { if($today>= $startDate && $today <= $endDate) {echo '<tr id="current_week" >';} else {echo '<tr class="john">';} } else echo '<tr class="john">';
Instead of $current I used $now, it is better for me, for clarity reason. That is one thing.The other is the echo statements above where i got to implement the conditional you gave me. Do not be distracted from "monthgreen", this is for when the users are seeing the month-this is OK. What do you think? If there is a syntax error i cannot find it.