Bonjour,
voila j'ai un problème dans ma fonction ^^' la voici :
// Retourne la table de multiplication de $n.
function tableMultiplication($n)
{
echo "Table de multiplication de $n.";
echo "<br>"."<br>";
echo "<tr><td>$n x</td>";
for ($i = 0; $i < 10; $i++)
{
echo "<th>$i</th>";
}
echo "</tr>\n";
echo "<tr><th>=</th>";
for ($i = 0; $i < 10; $i++)
{
$res=$i*$n;
echo "<td align = center>$res</td>";
}
echo "</tr>\n";
echo "<br>"."<br>";
echo "______________________________";
echo "<br>"."<br>"."<br>";
}
// Boucle qui les génére toutes
for ($n = 0; $n < 2; $n++)
{
tableMultiplication($n);
}
cette fonction marche mais les tableau sont tous collés et les entête aussi !?
voila j'ai un problème dans ma fonction ^^' la voici :
// Retourne la table de multiplication de $n.
function tableMultiplication($n)
{
echo "Table de multiplication de $n.";
echo "<br>"."<br>";
echo "<tr><td>$n x</td>";
for ($i = 0; $i < 10; $i++)
{
echo "<th>$i</th>";
}
echo "</tr>\n";
echo "<tr><th>=</th>";
for ($i = 0; $i < 10; $i++)
{
$res=$i*$n;
echo "<td align = center>$res</td>";
}
echo "</tr>\n";
echo "<br>"."<br>";
echo "______________________________";
echo "<br>"."<br>"."<br>";
}
// Boucle qui les génére toutes
for ($n = 0; $n < 2; $n++)
{
tableMultiplication($n);
}
cette fonction marche mais les tableau sont tous collés et les entête aussi !?