$WBGETV - get data from WB variable or array
Availability
$WBGETV is available for use with all WBSP commands.
Syntax
$WBGETV{varname}
$WBGETV[varname]
Parameters
varname - the name of the variable
Returns
Value of requested WBSP variable
Example
<!--
[FormFields]
wb_command=r
-->
<!--WB_BeginTemplate-->
<html>
<head>
<title>Titles</title>
</head>
<body>
$WBSETV[loopcounter|0]
$WBWHILE[$wbgetv[loopcounter]<=10|
The loopcounter value is:$wbgetv[loopcounter]<br>
$WBSETV[loopcounter|$wbcalc[$wbgetv[loopcounter]+1]]
]
Loop ended, loopcounter value is $wbgetv[loopcounter]!
</body>
</html>
After running this example, the resulting page in browser, may look like
this:
The loopcounter value is:0
The loopcounter value is:1
The loopcounter value is:2
The loopcounter value is:3
The loopcounter value is:4
The loopcounter value is:5
The loopcounter value is:6
The loopcounter value is:7
The loopcounter value is:8
The loopcounter value is:9
The loopcounter value is:10
Loop ended, loopcounter value is 11!