A ver si esto te aclara el panorama...
Código PHP:
<?php
mysql_connect("localhost","root","");
$result = mysql_db_query("baseDdatos","select * from usuarios");
$cols=mysql_num_fields($result);
echo"<table>";
while($row = mysql_fetch_array($result)) {
echo"<tr>";
for($i=0;$i < $cols;$i++) {
echo "<td>".$row[$i]."</td>";
}
echo"</tr>";
}
echo"</table>";
mysql_free_result($result);
?>
Saludos!