How to check current date between two dates in PHP ?

Admin   PHP   350  2021-03-18 22:00:11

Hii guys,

In this artical, I will show you how to check current date between two dates in php. current date between two date check in using php.

You can check date between two dates using php .You can get current date then start date and end date between date then return true otherwise false return.

Solution 1

 

$today = date('Y-m-d');

$today=date('Y-m-d', strtotime($today));

$stratDate = date('Y-m-d', strtotime("01/01/2018"));

$endDate = date('Y-m-d', strtotime("01/12/2019"));

if (($today >= $stratDate) && ($today = $stratDate) && (date('Y-m-d', time())