Hi i found a solution that is must faster and easy to use. Tanx for the reply
function ago($unix)
{
$datetime1 = new DateTime(date("Y-m-d H:i:s", $unix));
$datetime2 = new DateTime();
$interval = $datetime1->diff($datetime2);
return $interval->format('%a days, %H hours, %I min and %S sec ');
}
This returns 0 days, 19 hours, 33 min and 31 sec