when i echo out the entries made in my database, i want to mark the ones less than three days old as ‘New’ or ‘Latest’ etc.
The script below marks them if they were posted today but i’m not sure how to test it against the above. Can someone amend this to reflect what i’m after?
<?php
$today = date('d M Y');
if ($date = date('d M Y', strtotime($rsjobinfo['date'])) == $today) { ?>
<p>NEW</p>
<?php
;}
?>
Thanks in advance
Dan
time()will give you the current time, in seconds. You can subtract the date of the article (in seconds) to determine if it occurred in the last three days.