Years

Outputs a list of years. To create a standard select field, use year_select

Table of Contents

Parameters

years

The number of years, starting from the current year, to print. Default value is 5.

years="5"

Variables

year

Prints out the current year of the loop.

{year}

Examples

<select name="expiration_year">
{exp:cartthrob:years years="6"}
    <option value="{year}">{year}</option>
{/exp:cartthrob:years}
</select>