$WBALIDX - last array index

Availability
$WBALIDX is available for use with all WBSP commands.

Syntax
$WBALIDX{arrayname}
$WBALIDX[arrayname]

Parameters
arrayname - the name of the array

Returns
Last index value in requested WBSP array

Example

<!--
[FormFields]
wb_command=R
-->
<!--WB_BeginTemplate-->
<html>
<head>
<title>WBSplit</title>
</head>
<body>
$wbsetv[filecount|0]
$wbsplit[$wbdir[]|dirlist|,|f]
$wbwhile[$wbgetv[filecount]<=$WBALIDX[dirlist]
|
$wbgetv[dirlist($wbgetv[filecount])]<br>
$wbsetv[filecount|$wbcalc[$wbgetv[filecount]+1]]
]
</body>
</html>  

After running this example, the resulting page in browser should contain the list of all files in the directory where current WBSP file is located.