Created
March 11, 2016 16:55
-
-
Save roryl/4e535ef1e514472a58ce to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
myVar = "test"; | |
myStruct = {test:"foo"; test2:"bar"} | |
echo(myStruct[myVar]); //outputs "foo" | |
echo(myStruct["#test2#"]; //outputs "bar" | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
myVar = "test"; | |
"#myVar#" = "foo"; | |
echo(test); //outputs foo | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
myVar = "test"; | |
evaluate("#myVar# = 'foo'"); | |
echo(test); //outputs foo | |
</cfscript> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfscript> | |
myVar = "foo"; | |
test = evaluate("uCase(myVar)"); | |
echo(test); //outputs FOO | |
</cfscript> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment