This tag aborts processing of the currently executing CFML
custom tag, exits the page within the currently executing CFML
custom tag, or re-executes a section of code within the
currently executing CFML custom tag.
<cfexit>
exit;
exittag
exittemplate
loop
Here the loop over the 5 number. When it's meet the condition as true then the block of code get exit.
<cfoutput>
<cfloop from="1" to="5" index = "i">
<cfif i EQ 3>
<cfexit>
<cfelse>
#i#
</cfif>
</cfloop>
</cfoutput>
Expected Result: 1 2
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.