getVariable

Retrieves value of a variable

getVariable(name) → returns any

This function requires Lucee.  Not supported on Adobe ColdFusion, etc.

Argument Reference

name string
Required

Examples
Sample code invoking the getVariable function

a=1;
writeOutput(getVariable('a'));

Expected Result: 1

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub