liamloveslearning Posted May 14, 2010 Share Posted May 14, 2010 Hi everyone, I have this script <?php $today = $row_rsworksorders1['intraartapproval']; $est = strtotime('+15 day', strtotime($today)); print date('d/m/Y', $est); ?> I need to say if $est is 14 days past the current date change the font colour, has anybody any idea how to do this? Thanks Link to comment https://forums.phpfreaks.com/topic/201724-if-statement-on-date/ Share on other sites More sharing options...
cs.punk Posted May 14, 2010 Share Posted May 14, 2010 <?php //example $given = mktime(0, 0, 0, 4, 25, 2010) + (14 * 24 * 60 * 60); $today = time(); if ($given >= $today) {echo "Not dated."; } else {echo "Out dated"; } ?> That should do the trick. Link to comment https://forums.phpfreaks.com/topic/201724-if-statement-on-date/#findComment-1058229 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.