table check header
This function checks if a header with the specified header name is existing. If the header is found, then the column number will be returned. Otherwise, an exception will be asserted.
Indirect parameter passing is disabled
2
No. | Type | Description |
---|---|---|
1 input |
string | Name of existing table |
2 input |
table column | Header name or column number See table columns as function parameters for general ruling for this parameter.
|
Type | Description |
---|---|
numeral | Column number Note: 1st column begins with 0 |
Table not found
Header name not found
table initialize ( table 1,
{ { Last Name, First Name, Phone No, Age }, { Larsson, Lara, "1-212-555-1212", 28 } } );
echo( table check header ( table 1, Phone No ) );
// echo( table check header ( table 1, Gender ) ); // Not executed now, would cause exception
2