Can't understand why this doesn't work and is driving me insane
I'm trying to highlight a table row a different color if a date is today's date, in the the past and has not yet occurred.
E.g.
If I echo out the today variable I get Wed Aug 19th and echoing the variable called theDate I get Wed Aug 19th.
This is the bit that annoys me. Highlighting the current day works as expected, but highlighting past and future dates doesn't (everything other than today is highlighted green):
Can anyone shed some light on this, as I'm sure I'm missing something obvious.
Thanks

I'm trying to highlight a table row a different color if a date is today's date, in the the past and has not yet occurred.
E.g.
PHP:
$theDate = date('D M jS',strtotime($row[''theDate]));
$today = date('D M jS');
$today = date('D M jS', strtotime($today));
If I echo out the today variable I get Wed Aug 19th and echoing the variable called theDate I get Wed Aug 19th.
This is the bit that annoys me. Highlighting the current day works as expected, but highlighting past and future dates doesn't (everything other than today is highlighted green):
PHP:
if ($today == $theDate) {
$highlight_today = "style=\"background:#FFBABA;\"";
} elseif ($theDate > $today) {
$highlight_today = "style=\"background:#DFF2BF;\"";
} else {
$highlight_today = "style=\"background:#fff;\"";
}
Can anyone shed some light on this, as I'm sure I'm missing something obvious.
Thanks