Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save trycf/4eb8d9493fcca79baeb2bc5d5a11998a to your computer and use it in GitHub Desktop.
Save trycf/4eb8d9493fcca79baeb2bc5d5a11998a to your computer and use it in GitHub Desktop.
TryCF Gist
<cfoutput>
<h3>Tag Based Loop</h3>
<cfloop index="my_index" from="1" to="5">
The current value of my_index is #my_index#<br>
</cfloop>
<cfscript>
writeOutput("<h3>Script Based Loop</h3>");
cfloop ( index="my_index", from="1", to="5") {
writeOutput("The current value of my_index is " & my_index & "<br>");
}
writeOutput("<h3>Script Based &quot;For&quot; Loop</h3>");
for (my_index = 1; my_index lte 5; my_index++) {
writeOutput("The current value of my_index is " & my_index & "<br>");
}
</cfscript>
</cfoutput>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment