Elenco dei parametri

Valori restituiti

Returns an associative array of strings representing the fetched row in the result
set, where each key in the array represents the name of one of the result
set's columns or NULL if there are no more rows in resultset.

If two or more columns of the result have the same field names, the last
column will take precedence. To access the other column(s) of the same
name, you either need to access the result with numeric indices by using
mysqli_fetch_row() or add alias names.

User Contributed Notes 2 notes

I often like to have my results sent elsewhere in the format of an array (although keep in mind that if you just plan on traversing through the array in another part of the script, this extra step is just a waste of time).

This is my one-liner for transforming a mysqli_result set into an array.<?php$sql = new MySQLi($host, $username, $password, $database);