php check if time is less than the current time,php check if time is greater than,if current time is greater than php,php if time is greater than,check if time is greater than php,check time greater than in php,php calculate date difference,php compare two dates,php get day diff,date diff php,php check if day in month,php get date between two dates,check if date is within range php,how to find two date under how many mondays find in php,check if is the last day of the month php,date comparison function in php,php compare dates,Number of week days between two dates in php,php date compare with today,php calculate weeks between two dates,check if date is past php,week starting date and end date in php,today date to ago for the date in php,php if time is greater than,compare dates datetime php,what sign is greater than or equal to php,php check if date is older than 1 month,check if given date time is of today or yesterday php,php date difference in days,php inline if condition date time,php compare date less than today,php date < than date,php check if daTE is less or equal to now minus,greater or equal to current date php,php if date is before today,php check if date input greater than 01/01/2000,php date validation greater than today,check if date and time greater than in php,how to check if the current date time is greater then the specific date and time in php,how to check if the current date is greater then the specific date in php,php check if mysql datetime is greater than today,date is greater than today php,assert date greater than now php,check if date bigger php,php check if date is a day old,check if date is equal to current date php,php check day than,php check date is equal to sysdate,how to check if time and date is less than current time and date in php,php check if date is 7days plus than date,php given date greater than current date,php date larger than,php date less than today,php check date less,php check date is lesser than today,check if the date id greater than current date in php,start date less than end date in php,check date is not greater than today php,php check if "date and time" greater than today,php check if date and time greater than today,check if date greater than another date php,time less than comparison php,PHP check if date is before today,php check if date grater than 3 day from now,check if one date is great than other php,if date is smaller than today php,check dates larger than date php,php validate date is greater than another date,php is date smaller than other date,how to check if a date is greater than today's date in php,php if date less than current date,php + datetime + bigger than today,php date time greater than today,see if date is bigger than current date php,php check if date greater than,php check date less than date,how to check a date is greater than another date php,php check date less than current time,php how to check cureent date is greater,today bigger than a date php,check if datetime is less than today php,php check if datetime is greater than current datetime,php if today date less than,php check date is less than today,check if date is bigger php,date bigger than date php,php datetime check if date is greater,,php check if date is less than other date,if today date is greater then previous date ddo this in php,php date validation greater than today by 7days,check if date is greater or small between two dates php,check if date greater than today php,php check if date is greater than 30 days,php if variable date is less then today date,php count if date is less than today,check if string to date is greater than today php,php check if time is bigger than today,find date is less than current date in php,warning if date is greater than current date php,php check if datetime is greater than today,php check if date is greater than today php,php if date time bigger than,php check if one date is greater than the other,how to check date if bigger then 1 to 15 php,check if end date is greater than start date in php,how to check date is greater than current date in php,if date less than today php,check date greater than current date in php,check if date is greater than today's date php,php date bigger than 0 today,php date bigger than today,check if a date is greater than other in php,how to check if a date is greater than another date in php,php check if given date is greater than curent date,checking if date is greater in php,check if date greater or less than today php,check if a date is greater than other php,php check if a datetime is bigger then other,php if datetime is less than today,php if date less than today,php check if date if less than today date,php check if time is greater than,php if current date is greater than and days,php if current date is greater than,check date greater than today php,php check if date is greater than,php if date is less than today,if current date is greater than created at date php,php check if date less than today,php check if date is less than today,check date less than current date php,php check if date is less than now,php check if datetime is greater than now,php check if date is bigger than today,data validation greater than today php,if date greater than today php,if current date is greater than php,php date greater than date php,how to check date is greater than other date in php,date is greater than today,older than today php,php check if date is greater than now,if date greter than in php,current date and current time greather than php,,php date is greather than curren date,php date is greather than curren tdate,date should not be greater than today php,php if date is greater than,if date is equal to or less than current date php,equal or less than date compare all php,how to compare dates php equal or grater siin,php if date greater than now,php check date greater than today,php date greater than,check if date entered y user is jreater than today in php,php compare dates greater than,if date is greater than today php,if time is less than today,php if date is older than today,php date less than or greater than,php date is older than today,check expiry date greater than today php,php timestamp greater than,how to Not more than today php,php greater than or equal to date,php current date greater than,time more than now,check if date is less than today php,check if date is greater than today php,check date is greater than today in php,php if date is greater than today,date should be greater than today in php,php check if date is more than or equals to current date,php if date older than current date,php if date older than today,php check which date is greater,if date is greater than today php highlight test,date is greater than today based on month day in php,date is greater than today in php,php check date greater than now,how to check if date is greater than today in php,php check if date is greater than today,php if date greater than,php date is above actual date,php check date is greater than today,php datetime greater than,check if date is older than today php,php when is a date bigger,date greater than php istring,date greater than php,php get current date and check greater than a date,more or less condition php date,check if date is superior php,html css date greater than today,php if date Ymd is later than today,php check if date is bigger than,php mysql string to date is greater than today,how to check big date php,greater than operation on time php,php function if the date is greater than another date

php check if time is less than the current time

php check if time is less than the current time


 $date_now = new DateTime();
 $date2    = new DateTime("01/02/2016");

if ($date_now < $date2) {
    echo 'less than';
}else{
    echo 'greater than';
}

PHP check if time is greater than the current time


 $date_now = new DateTime();
 $date2    = new DateTime("01/02/2016");

if ($date_now > $date2) {
    echo 'greater than';
}else{
    echo 'less than';
}

Please add your answer below

Post Created 102

Leave a Reply

Related Posts

Begin typing your search above and press enter to search. Press ESC to cancel.

Back To Top