When we want to output something from a mysql database we select, query it then use the mysql_fetch_array function to return an array that corresponds to the fetched row.
Most of us are using $row['rowname'] to extract desired info from that row but we can make use of list() function:
Example using $row['rowname']:
Basically list() function will put every element from an array obtained with mysql_fetch_row function in the variables $id (id column), $name (name column), $pass (pass column).
If the users database has more columns, for example datetime column but we don’t want to use it, then use list() like:
list($id, $name, $pass, ) – you notice that we’ve add a comma and an empty space to replace the variable.
No related php tutorials.