Skips over the rest of the code in a loop and continues the loop with the next iteration.
Other
<cfcontinue />
[] = Optional attribute
No Attributes
Example 1:
<p> Skip showing each 3rd number. </p> <cfloop from="1" to="50" index="i"> <cfif i MOD 3 EQ 0> X <cfcontinue /> You will never get here!! </cfif> <cfoutput>#i#</cfoutput> </cfloop>
Example 2: BINGO!
<cfset i = 1 /> <cfset bingo = 'BINGO' /> <cfloop condition="i LTE 5"> <div> <p> There was a farmer had a dog, </p> <p> And Bingo was his name-o. </p> </div> <div> <cfloop from="1" to="4" index="j"> <p> <cfloop from="1" to="5" index="k"> <cfif i EQ k> (clap) <cfcontinue /> </cfif> <cfoutput>#mid(bingo, k, 1)#</cfoutput> </cfloop> ! </p> </cfloop> </div> <div> And Bingo was his name-o! </div> <cfset i++ /> </cfloop>