PHP Manual
Prev |  | Next

# pg_fieldnum

(PHP 3 <= 3.0.18, 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 PosgreSQL `result` resource. Field numbering starts at 0. This function will return -1 on error.

See also pg_fieldname().

Prev | Home | Next
pg_fieldname | Up | pg_fieldprtlen