how to check if the date is in future php code example
Example: check if date is past php
$date = new DateTime($event['date']);
$now = new DateTime();
if($date < $now) {
echo 'Date is in the past';
}
$date = new DateTime($event['date']);
$now = new DateTime();
if($date < $now) {
echo 'Date is in the past';
}