Tableau

Résolu
jamstyle Messages postés 27 Date d'inscription   Statut Membre -  
jamstyle Messages postés 27 Date d'inscription   Statut Membre -
Bonjour,
La variable $i corespond a quoi ?
Configuration: Windows XP Internet Explorer 6.0

2 réponses

  1. elanore31 Messages postés 413 Statut Membre 50
     
    je suppose que c'est ton compteur de tableau fait voir ton code on t'aidera d'avantage ...
    0
  2. jamstyle Messages postés 27 Date d'inscription   Statut Membre
     
    Salut voici mon code

    pour un tableau de 3 lignes sur 4 colones j'ai la cellule en haut a droite qui n'est jamais occupé .

    $req3 = mysql_query('SELECT*FROM compte ORDER BY ordre LIMIT 0,12');

    $i=3;
    echo '<table bgcolor="#930204">'."\n";
    while($rep3 = mysql_fetch_array($req3)){

    if($i==12){
    echo '<tr>';
    }
    echo '<td bgcolor="#CCCCCC">'.$rep3['prenoms'].'</td>';
    if($i==4){
    echo '</tr>'."\n";
    $i=1;
    }

    $i++;
    }
    echo '</table>'."\n";
    0