There is a current date, there is some date that is taken from the base. I need to find the number of days between them, but when I try to do this, I get an error
Warning: date_diff() expects parameter 1 to be DateTimeInterface, string given Actually, the code itself
$currdate = date('Ym-d', $_SERVER['REQUEST_TIME']);//текущая дата $userdate = date('Ym-d', $user['expire_date']); //дата из базы $difference = date_diff($currdate, $userdate); When I try to google, it gives out about the same code as mine.