$WBASRC - search array elements for specified value

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

Syntax
$WBASRC{arrayname|varvalue}
$WBASRC[arrayname|varvalue]

Parameters
arrayname - the name of the array to search
varvalue - the value to search for 


Returns
The array index of the first matching element. If varvalue is not found the function returns -1.

Example

<!--
[FormFields]
wb_command=R
-->
<!--WB_BeginTemplate-->
<html>
<head>
<title>WBASrc</title>
</head>
<body>
$wbsplit[Mon,Tue,Wed,Thu,Fri,Sat,Sun|days|,|f]
$wbasrc[days|Thu]
</body>
</html> 

After running this example, the resulting page in browser should look like this:

3