when
$query = 'SELECT * FROM users';
and there are multiple columns/rows, does mysql_fetch_assoc($result)
return a two-dimensional array?
Can I draw each row by simply saying: array_pop(mysql_fetch_assoc($r))
thanks!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
mysql_fetch_assoc returns an associative array (an array with the selected column names as keys), one row at a time until there are no more rows in the result of the query. Call it in a loop to work with a row at a time:
(Assuming username and email are columns in the users table).