|
pg_fetch_allFetches all rows from a result as an array Description
array pg_fetch_all(PgSql\Result
$result, int $mode = PGSQL_ASSOC)pg_fetch_all returns an array that contains all rows (records) in the PgSql\Result instance.
Parameters
Return ValuesAn array with all rows in the result. Each row is an array of field values indexed by field name. Changelog
Examples
Example #1 PostgreSQL fetch all The above example will output something similar to:
Array
(
[0] => Array
(
[id] => 1
[name] => Fred
)
[1] => Array
(
[id] => 2
[name] => Bob
)
)
See Also
|