pg_fieldnum

(PHP 3, PHP 4 >= 4.0.0)

pg_fieldnum -- Returns the field number of the named field

Description

int pg_fieldnum ( resource result, string field_name)

pg_fieldnum() will return the number of the column (field) slot that corresponds to the field_name in the given PostgreSQL result resource. Field numbering starts at 0. This function will return -1 on error.

See also pg_fieldname().