Here's the code I'm trying to echo the data from the clearance form table if the $today date matches with the $expirydate from the clearance table
$today = date("Y-m-d");
$expirydate = $row->currentdate; //from database
$today_time = strtotime($today);
$expire_time = strtotime($expirydate);
if ($expire_time < $today_time) {
echo '(body....) ';