[ic] Loop with embedded Perl

Jeff Boes jeff at endpoint.com
Mon Aug 1 10:02:14 EDT 2005


I'm stuck on this:

        <select name="year">
        <option value="">Select one</option>
        [loop list=`1981..1900+(localtime())[5]`
         ] <option value="[loop-code]">[loop-code]</option>
        [/loop]
        <option value="prior 1981">1980 or older</option>
        </select>

What I'm attempting to generate is a drop-down list with a series of
year values, 1981 to the current year.

If I can get this working, what I'd really like is ..

list=`reverse 1981..1900+(localtime())[5]`

but at present neither of these works; I get an empty list and only the
last option.


More information about the interchange-users mailing list