Ver original$sql = "SELECT * FROM tabla ORDER BY id"; $result = mysql_query($sql) or die (mysql_error()); $numero_campos=mysql_num_fields($result); while($row = mysql_fetch_array($result)) { for ($i=0;$i<$numero_campos;$i++){ echo $row[$i].' '; if ($i == $numero_campos-1){ echo '<br>'; } } }