Home > PHP > Function > PostgreSQL > pg_fetch_row()

pg_fetch_row()

pg_fetch_row - Get a row as an enumerated array

Syntax

array pg_fetch_row (resource $result, int $row)

Arguments

  • result - PostgreSQL query result resource, returned by pg_query(), pg_query_params() or pg_execute() (among others).
  • row - Row number in result to fetch. Rows are numbered from 0 upwards. If omitted, next row is fetched.

Description

pg_fetch_row() fetches one row of data from the result associated with the specified result resource.

Version

PHP 4, 5

Return value

An array, indexed from 0 upwards, with each value represented as a string. Database NULLvalues are returned as NULL.