oci_fetch_array
Returns the next row from a query as an associative or numeric array.
oci_fetch_array Function synopsis
oci_fetch_array($statement, int $mode = OCI_BOTH | OCI_RETURN_NULLS): array|false
Parameters
$statement
Can also be a statement identifier returned by oci_get_implicit_resultset.
$mode
OptionalTypeintDefault valueOCI_BOTH | OCI_RETURN_NULLS
An optional second parameter can be any combination of the following constants:
Return value
Typearray|false
Returns an array with associative and/or numeric indices. If there
are no more rows in the $statement then
false is returned.
By default, `LOB` columns are returned as LOB descriptors.
DATE columns are returned as strings formatted
to the current date format. The default format can be changed with
Oracle environment variables such as NLS_LANG or
by a previously executed ALTER SESSION SET NLS_DATE_FORMAT command.
Oracle's default, non-case sensitive column names will have
uppercase associative indices in the result array. Case-sensitive
column names will have array indices using the exact column case.
Use var_dump on the result array to verify the
appropriate case to use for each query.
The table name is not included in the array index. If your query
contains two different columns with the same name,
use OCI_NUM or add a column alias to the query
to ensure name uniqueness, see example #7. Otherwise only one
column will be returned via PHP.
Changes to the oci_fetch_array Function
PHP 8.4
- Function removed
PHP 8.0
- Return type added:
array|false - Parameter name of parameter #1 changed:
$statement_resourceto$statement - Parameter type added for parameter #2 (
$mode):int - Parameter default value added for position #2 (
$mode):OCI_BOTH | OCI_RETURN_NULLS
- oci_fetch_array($statement_resource, $mode)
+ oci_fetch_array($statement, int $mode = OCI_BOTH | OCI_RETURN_NULLS): array|false oci_fetch_array Function Availability
oci_fetch_array Function Availability| PHP Version | Availability |
|---|---|
| PHP 8.6Upcoming Release | No |
| PHP 8.5Supported (Latest) | No |
| PHP 8.4Supported | No |
| PHP 8.3Security-Fixes Only | Yes |
| PHP 8.2Security-Fixes Only | Yes |
| PHP 8.1Unsupported | Yes |
| PHP 8.0Unsupported | Yes |
| PHP 7.4Unsupported | Yes |
| PHP 7.3Unsupported | Yes |
| PHP 7.2Unsupported | Yes |
| PHP 7.1Unsupported | Yes |
| PHP 7.0Unsupported | Yes |
| PHP 5.6Unsupported | Yes |
| PHP 5.5Unsupported | Yes |
| PHP 5.4Unsupported | Yes |
| PHP 5.3Unsupported | Yes |