cfscript - while loop in script
cfscriptWhile.cfm
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>cfscript tag: How to use while loop in cfscript</title>
</head>
<body>
<h2 style="color:DodgerBlue; font-style:italic">cfscript example: while loop</h2>
<hr width="350" align="left" color="PaleVioletRed" />
<br />
<b>
<cfscript>
counter = 1;
while(counter LTE 5){
WriteOutput("Counter Now: #counter# <br />") ;
counter = counter+1;
}
</cfscript>
</b>
</body>
</html>
- cftry and cfcatch - catch exception and handle error
- cfdiv
- cfscript - array in script
- cfscript - if else conditional statement in script
- cfscript - structure in script
- cfscript - switch, case, default statement in script
- cfscript - call user defined function (UDFs) in script
- cfscript - for loop in script
- cfscript - create, call and use function in script