Please someone let me know what is wrong in below code.

comparision does not work, date\_diff function outputs false

```
    $strtime = strtotime("2021-01-01");
    $rowdate = date("d-n-Y", $strtime);
    $nextmonthyear = date("d-n-Y", strtotime('first day of +1 month'));
    if ($rowdate > $nextmonthyear) {
        echo "cont";
    }

```