Script functions reference > Script functions in alphabetical order > S > SubstArr

SubstArr
Syntax
SubstArr(tbl_file, str_key, array);
tbl_file 
str_key 
array
Description
Looks up a key in a substitution table, and creates an array containing the entry values. Returns the number of entry values.
Returns
num
-1
Example
In this example, the following substitution table (author.tbl) is used.
//!CodePage UTF8!
//!multicolumn!
agatha    christie    1890
alfred    hitchcock   1899
The following script creates an array for the entry with key agatha:
$nCol = SubstArr("../data/tables/author.tbl", "agatha", $addrArr);
$surName = $addrArr[0];
$birthDay =  $addrArr[1];
Result:
$nCol = 2
$surName = christie
$birthDay = 1890
Notes
OpenText StreamServe 5.6 Updated: 2013-03-01