SetVariable()
Sets a variable value, supports scoped variable syntax
SetVariable( name=string, value=any );
Returns: any
| Argument | Description |
|---|---|
|
name
string,
required
|
edit
Name of the variable to set, allows using "." for structures/scopes. |
|
value
any,
required
|
edit
the value to set |
Examples
edit str="hi buddy";
setVariable('str', "Value changed");
writeOutput(str);
setVariable('session.AAA', "Hello docs reader");
dump(getVariable("session"));
See also
- Scopes
- GetVariable()
- Search Issue Tracker open_in_new
- Search Lucee Test Cases open_in_new (good for further, detailed examples)