|
|
|
|
Bonsoir,
<?php
//generation
$matrice=array();
for($l=0;$l<10;$l++){
for($c=0;$c<10;$c++){
srand();
$rand = rand(0, 100);// la on règle le mini maxi
$matrice[$l][$c]=$rand;
}
}
//affichage
?>
<html>
<table border=6 cellspacing=6 cellpadding=10>
<?php
// titre colonne
echo "<tr><td> </td>";
for($c=0;$c<10;$c++){
echo "<td><b>Col $c</b></td>";
}
//
for($l=0;$l<10;$l++){
echo "<tr><td><b>Ligne $l</b></td>";// titre ligne
for($c=0;$c<10;$c++){
echo "<td>";
echo $matrice[$l][$c];
echo "</td>";
}
echo "</tr>";
}
?>
</table>
</html>
|