Código PHP:
<?
$i = 0;
require('operaciones/sql.php');
mysql_connect($dir_bd,$user_bd,$pass_bd) or die($error_con);
mysql_select_db($nombre_bd)or die($error_bd);
$registros = mysql_query("SELECT * FROM paises order by pais");
$myrow=mysql_fetch_array($registros);
echo "<table align='center' bordercolor='#000000' border='1px'><tr>";
do
{
if ($i<8) {
$i++;
echo "<td>";
echo "".$myrow[pais]."";
echo "</td>";
} else{
echo "</tr><tr><td>";
echo "".$myrow[pais]."";
echo "</td></tr>";
$i = 0;
}
}while($myrow=mysql_fetch_array($registros));
echo "</table>";
?>