Complete PHP MySQL Reference
The mysql_fetch_array() function returns a row from a recordset as an associative array and/or a numeric array.
This function gets a row from the mysql_query() function and returns an array on success, or FALSE on failure or when there are no more rows.
| Parameter | Description |
|---|---|
| data | Required. Specifies which data pointer to use. The data pointer is the result from the mysql_query() function |
| array_type | Optional. Specifies what kind of array to return. Possible values:
|
Note: After the data is retrieved, this function moves to the next row in the recordset. Each subsequent call to mysql_fetch_array() returns the next row in the recordset.
Tip: Field names returned by this function are case-sensitive.
The output of the code above could be:
Complete PHP MySQL Reference
Your message has been sent to W3Schools.