How can you add all the rows from a mysql_query to a mysql_fetch_array()? I want to be able to do it as efficiently as possible as it could be working with quite a few rows.
The most common way:
$rows = array(); while(($row = mysql_fetch_array($result))) { $rows[] = $row; }
as shown in the examples in the documentation.
2.1m questions
2.1m answers
60 comments
57.0k users