![]() Creating ColdFusion variables using variables
05/19/2011 in How To
Once thing I really like about ColdFusion that many other languages do not support is the ability to create variables using variables.. |
For example:
<cfset v="name">
<cfset "first#v#"="David">
<cfoutput>#firstname#</cfoutput>
This creates a variable called firstname.
<cfoutput>#firstname#</cfoutput>
This would output:
David
Easy. Used creatively, this functionality enables you to really create some real cool code. So what are you waiting for, go get creative!
Enjoy..