select('punches', ['in', 'out'], ['AND' => ['uid' => $_SESSION['uid'], 'in[>]' => $weekstart]]); $punchtimes = []; foreach ($punches as $p) { $punchtimes[] = [$p['in'], $p['out']]; } $totalseconds = sumelapsedtimearray($punchtimes); lang2("x on the clock", ["time" => seconds2string($totalseconds, false)]); ?>