PHP mysqli_fetch_array() Function

PHP mysqli_fetch_array() function is used to fetch results row as an associative, a numeric array, or both.

Syntax

mysqli_fetch_array() Function Parameter

ParameterDescription
result :Required parameter. Mention a result set identifier returned by mysqli_query().
resulttype :Optional paramater. Mention type of array that should be generated. The resulttype could be MYSQLI_ASSOC or MYSQLI_NUM or MYSQLI_BOTH.

mysqli_fetch_array() Function Return Value

Return Values :Returns an array of strings that corresponds to the fetched row, or FALSE if there are no more rows.

mysqli_fetch_array() Function Example