mysql_fetch_array return only one row

That’s because the array represents a single row in the returned result set. You need to execute the mysql_fetch_array() function again to get the next record. Example:

while($data = mysql_fetch_array($array)) {
  //will output all data on each loop.
  var_dump($data);
}

Leave a Comment