Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 08/02/2023 in all areas

  1. Try this. You don't need date arithmetic for years. $start = 2020; $end = 2029; for ($y=$start; $y<=$end; $y++) { $session = sprintf('%d-%d', $y, $y+1); echo $session . '<br>'; } output 2020-2021 2021-2022 2022-2023 2023-2024 2024-2025 2025-2026 2026-2027 2027-2028 2028-2029 2029-2030
    1 point
  2. A good portion of the programming community, quite possibly the majority, encourages trailing commas on multi-line statements in languages that support it.
    1 point
This leaderboard is set to New York/GMT-05:00
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.