## db_fetch_array

array db_fetch_array (resource sqlresult [, type])

Retrieves an array from a resource.

NOTE: This is a SQL function. See Database Support for more information.

Arguments

sqlresult is the resource handle returned from a SQL query.
type defines the kind of array (numerical, associative or both). Accepted values are `FETCH_BOTH` (the default), `FETCH_NUM` and `FETCH_ASSOC`.

Result

An array with the results of the fetched resource.

Example

`// List the field(column) "Tel./Fax" in mytable $result = db_query("SELECT 'Tel./Fax' FROM mytable"); $tel_fx_nrs = db_fetch_array($result);`

See also

Database functions
Database support