Bonjour,
J'ai une erreur concernant un index indéfini dans une boucle et je ne vois quelle peut être la solution.
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11 while ($sommaire[$n][0]!=null) { if($sommaire[$n][1]=="sommaire0") { $index0=$index0."<TD style=\"background-color: #55AAFF ;\" WIDTH=".intval($largeur/$a)."><a style=\" text-decoration: none; \" href=\"#\" onclick=\"ShowPage('".$sommaire[$n][0]."')\">".$sommaire0[0].$sommaire[$n][0].$sommaire0[1]."</a></TD>"; //echo $index0; } else { //$sommaire[$n-1][1]<$sommaire[$n][1]; $indexcol[$sommaire[$n][2]]=$indexcol[$sommaire[$n][2]]."<a style=\"text-decoration: none; \" href=\"#\" onclick=\"ShowPage('".$sommaire[$n][0]."')\">".$sommaire1[0].$sommaire[$n][0].$sommaire1[1]."</a>"; } $n++; }Cette ligne correspond àNotice: Undefined offset: 2 in C:\serveur\apache2\htdocs\eeeter\sommaire.php on line 56
Code : Sélectionner tout - Visualiser dans une fenêtre à part $indexcol[$sommaire[$n][2]]=$indexcol[$sommaire[$n][2]]."<a style=\"text-decoration: none; \" href=\"#\" onclick=\"ShowPage('".$sommaire[$n][0]."')\">".$sommaire1[0].$sommaire[$n][0].$sommaire1[1]."</a>";
Partager