mysql_fetch_assoc

array mysql_fetch_assoc(mysql result result_handle) 

Fetches a row of data from a result handle and returns it as an associative array.

Returns:

Associative array containing one row of query data; FALSE when out of data or on error

Description:

mysql_fetch_assoc() retrieves a row of data from a result handle returned by mysql_db_query() or mysql_query(). After the data is retrieved, the result handle’s internal pointer is advanced one position. The data is returned as an associative array that uses the column names as the array keys. If column names are duplicated, the data in the last column in the query sharing the name overwrites the other values. To access data from these types of queries, either use mysql_fetch_row() ...

Get PHP Functions Essential Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.