I want to know the difference in days between two dates given in the format:
2018/01/05
PHP Code:
$diferencia_dias = $check_in->diff($check_out);
echo $diferencia_dias->format('%R%a días');
Error:
Fatal error: Call to a member function diff() on a non-object