A voir également:
- Php tableau 2 dimensions
- Tableau word - Guide
- Supercopier 2 - Télécharger - Gestion de fichiers
- Tableau ascii - Guide
- Trier un tableau excel - Guide
- Tableau croisé dynamique - Guide
5 réponses
Bonsoir,
Essayes ça:
Essayes ça:
<?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>
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre question
echo "<tr><td>& nbsp ;</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>";