Bonjour,
j'ai un problème avec mon tableau a cause du For et while en meme temps
voici mon code qui pause problème
En faite je voudrais afficher mes utilisateurs dans un tableau
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 $pos = mysql_query('SELECT * FROM utilisateurs ORDER BY position ASC') OR die(mysql_error()); $msg .= '<table border="1" width="100%"> <tr> <td colspan="1" width="50"><b><font face="Verdana" size="1" color="lime">Position</font></b></td> <td colspan="1"><b><font face="Verdana" size="1" color="lime">Joueur</font></b></td> <td colspan="1"><b><font face="Verdana" size="1" color="lime">Alliance</font></b></td> <td colspan="1"><b><font face="Verdana" size="1" color="lime">Action</font></b></td> </tr>'; $count = 0; while ($class = mysql_fetch_array($pos)){ for($i = 0; $i < 20; $i++){ $count++; $msg .= '<tr> <th><font face="Verdana" size="1" color="white">'.$count.'</font></th> <th><font face="Verdana" size="1" color="white">'.$class['pseudo'].'</font> <th><font face="Verdana" size="1" color="white">'.$class['tag_alliance'].'</font> <th colspan="1"><font face="Verdana" size="1" color="white"></font> </tr>'; } } $msg .= '</table>';
de 20 places mais je voudrais que le tableau afficher mes 20 emplacements
sur ma page du site
Savez vous pourquoi il ne fonctionne pas s'il vous plait ?
Merci
Cordialement,
Partager