CFloop +1

ColdFusion Add comments

This got me the other day.  If you reference your index var after an index loop, it will be +1 higher than the "to" value. In the example the post loop value will be 11 not 10.

<cfoutput>
<cfloop index="i" from="1" to="10">
#i#<br />
</cfloop>
Post loop: #i#
</cfoutput>

0 responses to “CFloop +1”

Leave a Reply




Powered by Mango Blog. Design and Icons by N.Design Studio