PHP mysqli_fetch_all() Function
Example
Fetch all rows from a result set as an associative array:
Definition and Usage
The mysqli_fetch_all() function fetches all rows from a result set as an associative array, a numeric array, or both.
**Note:** This function is only available with the MySQL Native Driver.
Syntax
mysqli_fetch_all(
result,resulttype
)
;
| Parameters | Description |
|---|---|
| result | Required. Specifies the result set identifier returned by mysqli_query(), mysqli_store_result(), or mysqli_use_result(). |
| resulttype | Optional. Specifies which type of array should be produced. Can be one of the following values:
|
Technical Details
| Return Value: | Returns an associative or numeric array containing the result rows. |
|---|---|
| PHP Version: | 5.3+ |
PHP MySQLi Reference Manual