I'm trying to get time difference. This is my function, $date
variable is formatted with date("d/m/Y H:i:s");
as well. But whenever I try to call function, the return variable is equal to 0. How can I fix that?
function timedifference($date){
$old_time = strtotime($date);
$current_time = strtotime(date("d/m/Y H:i:s"));
$difference = $current_time - $old_time;
return $difference;
}