0) { $timers[$t]--; } else { $timers[$t] = 6; $timers[] = 8; } } echo sprintf('After %u day(s): %s%s', $i + 1, implode(',',$timers), "\n"); } echo count($timers);