Answers for "php check if date grater than 3 day from now"

PHP
0

php check if date is bigger than today

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

if ($date_now > $date2) {
    echo 'greater than';
}else{
    echo 'Less than';
}
Posted by: Guest on August-10-2020
0

get 2 days before date in php

date('Y/m/d',strtotime("-1 days"));

Or Use DateTime class like this-

$date = new DateTime();
echo $date->modify("-1 days")->format('Y-m-d');
Posted by: Guest on June-22-2021

Code answers related to "php check if date grater than 3 day from now"

Browse Popular Code Answers by Language