table column number
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, -1 is returned.
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. -1 is returned if the column cannot be found. |
Table not found
table initialize ( table 1,
{ { Last Name, First Name, Phone No, Age }, { Larsson, Lara, "1-212-555-1212", 28 } } );
echo( table column number ( table 1, Phone No ) );
echo( table column number ( table 1, Gender ) ); // Returns -1
2
-1