This content has been marked as final. Show 4 replies
Use the "step" attribute. The default is step="1" (ie increment by positive 1). You can cause the loop to "count down" by using step=" -1". (ie decrease the index by 1 in each loop)
Great - thanks - so easy. there you have it folks.
But remember to then swap the "to and "From" values as well.
<cfloop index="q" from="5" to="-5" step = "-1">
It's also perhaps worth remembering all this sort of thing is a mouseclick
away, in the documentation:
You don't need to waste time sitting there wondering how to do it, or
trying different stuff, or wait for people to come back to you via the
forums (although they were pretty quick, this time): you can help yourself,
via the docs.