How to use cfbreak to break a loop in ColdFusion

cfbreak - break a loop


<!DOCTYPE html>
<html xmlns="">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cfbreak tag example: how to use cfbreak tag to break a loop</title>

<h2 style="color:Crimson">cfbreak Tag Example</h2>

<cfloop from="1" to="10" index="Counter" >
  <b>Current Counter:</b> #Counter#
        <br />
        <cfif Counter EQ 6>
         loop break at the position 6

<br /><br />
Other code goes here...


More ColdFusion examples