Code: Select all
$todate = new DateTime($row->dateto);
if ($today > $todate)
{ echo "<div style='border: 1px dotted #ff0000; padding: 2px; font-size: x=small;'>EXPIRED</div>";}Today's date is 17th September 2010.
This is showing the Expired result.
And when i do:
Code: Select all
$calc = ($todate < $today);
echo "$calc";It should be zero, or empty shouldn't it?
I'm trying to show EXPIRED when an entry is either past the TO DATE.