I have to check expiry date is passed with current date and then disable the link. Should i convert strtotime function and check or is there any simple way to check it. We should not compare the dates
$current_date = "2018-07-23 12:00:00";
$expiry date = "2018-07-22 12:00:00";
if($expiry date>$current_date){
$link = "<a href="http://www.example.com";
} else {
$link = "#";
}