New: Learn Statamic on Laracasts!

We've retired the forum in favor of GitHub Discussions.

New conversations can be started on GitHub. Existing conversations will remain for a while longer.

Head over to GitHub →

Dynamic array values?

Taylor Collins February 22, 2019 by Taylor Collins

I'd like to generate an array of years so that I can loop through them, starting with the current year: [current year], [current year + 1], [current year +2], etc.

<select name="year">
  <option value="...">...</option>

Any ideas on how to go about doing that?

Answered by Taylor Collins!
>>>>>>> Answered <<<<<<<
5 Replies