jamesxg1 Posted April 19, 2009 Share Posted April 19, 2009 ok here the dilema, $date = date('Y-m-d'); $morerow = mysql_fetch_array($result); if ($morerow['when'] == $date) { $morerow['when'] is a date like so YYYY-MM-DD and i need to make a IF statment that will only allow you to pass if $date is equal to or above the $morerow['when'] how would i do this ? Link to comment https://forums.phpfreaks.com/topic/154784-date-help/ Share on other sites More sharing options...
jamesxg1 Posted April 19, 2009 Author Share Posted April 19, 2009 does anyone know how to do this ? Link to comment https://forums.phpfreaks.com/topic/154784-date-help/#findComment-813948 Share on other sites More sharing options...
thebadbad Posted April 19, 2009 Share Posted April 19, 2009 <?php if (strtotime($date) >= strtotime($morerow['when'])) { //$date is the same or a later date than $morerow['then'] } ?> Link to comment https://forums.phpfreaks.com/topic/154784-date-help/#findComment-813954 Share on other sites More sharing options...
jamesxg1 Posted April 19, 2009 Author Share Posted April 19, 2009 <?php if (strtotime($date) >= strtotime($morerow['when'])) { //$date is the same or a later date than $morerow['then'] } ?> cheers mate i dont know if this works yet but i will test now. Link to comment https://forums.phpfreaks.com/topic/154784-date-help/#findComment-813957 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.