Reading data

Other topics

MYSQLi result into a numbered array

$data = $result->mysqli_fetch_array(MYSQLI_NUM);

MYSQLi data into a column name array

$data = $result->mysqli_fetch_array(MYSQLI_BOTH);

Syntax:

  1. $result->mysqli_fetch_array(MYSQLI_BOTH)
  2. $result->mysqli_fetch_array(MYSQLI_NUM)

Parameters:

ParameterDescription
MYSQLI_BOTHtells the script to use the column names as indexes e.g. $data['username']
MYSQLI_NUMtells the script to use number indexes e.g. $data[1]

Contributors

Topic Id: 10167

Example Ids: 31154,31155

This site is not affiliated with any of the contributors.