Hi,
I am trying to highlight the results based on a date. For example I have a query that gives me several results. My goal is to use my date field (called mod_date_time) to highlight results that have been listed in the last 10 days. My mod_date_time date format is
2003-10-08 16:43:00.
I am trying to use the code below to highlight the result. It isnt working. Can you offer some help? If I change < to > all results show up as new listing.
I appreciate all your help....
Thanks
<?
$now = date("Y-d-m H:i:s", strtotime("-10 days"));
?>
<?
$newlisting = "$row[mod_date_time]";
if(($newlisting) < '$now') {
$displaynewlisting = "
<table border=0 cellspacing=1 width=100%>
<tr>
<td width=100% bgcolor=#FFFF00>
<p align=center><font size=2><b>New Listing</b></font></td>
</tr>
</table>
";
}
echo $displaynewlisting;
?>