GetVariable()
Gets the variable referenced by the given string; supports using "." for structures/scopes.
GetVariable( name=string );
Returns: any
Argument | Description |
---|---|
name
string,
required
|
Name of the variable to return, supports using "." for structures/scopes. |
Examples
str="susi";
writeOutput(getVariable('str'));
<span class="nf">setVariable</span><span class="p">(</span><span class="s1">'session.AAA'</span><span class="p">,</span> <span class="s2">"Hello docs reader"</span><span class="p">);</span>
<span class="nf">dump</span><span class="p">(</span><span class="nf">getVariable</span><span class="p">(</span><span class="s2">"session.AAA"</span><span class="p">));</span>
<span class="nf">dump</span><span class="p">(</span><span class="nf">getVariable</span><span class="p">(</span><span class="s2">"session"</span><span class="p">));</span>
See also
- Scopes
- SetVariable()
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)