IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

PHP & Base de données Discussion :

Séparation de tableau par date


Sujet :

PHP & Base de données

  1. #1
    Membre éclairé
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Février 2007
    Messages
    758
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : Finance

    Informations forums :
    Inscription : Février 2007
    Messages : 758
    Par défaut Séparation de tableau par date
    bonjour, j'ai besoin d'aide, j'ai un tableau qui m'affiche les données de ma table et dedans j'ai le champ date au format aaaa/mm/jj et 'date_fr' me convertit date au format jj/mm/aaaa

    voici le code de mon 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
    25
    26
    27
    <?php
    $indice = 0;
    $retour = mysql_query('SELECT *, DATE_FORMAT(date, "%d/%m/%Y") AS date_fr  FROM gardespv ORDER BY date DESC');
    while ($donnees = mysql_fetch_array($retour)) 
    {
    if($donnees['valide'] == 'Oui') 
      {
        $style= 'background-color: green;';
      }
      else
      {
      $style = 'background-color: #ffffff';
      }
    ?>
    <tr style="<?php echo $style; ?>">
    <td><?php echo '<a href="rediger_SPV.php?modifier_garde=' . $donnees['id'] . '">'; ?><img src="button_edit.png"></a></td>
    <td><?php echo '<a href="liste_SPV.php?supprimer_garde=' . $donnees['id'] . '">'; ?><img src="button_drop.png"></a></td>
    <td><?php echo stripslashes($donnees['nom']); ?></td>
    <td><?php echo stripslashes($donnees['date_fr']); ?></td>
    <td><?php echo stripslashes($donnees['horaire']); ?></td>
    <td><?php echo stripslashes($donnees['valide']); ?></td>
    <td><?php echo stripslashes($donnees['annule']); ?></td>
    </tr>
    <?
     
    } // Fin de la boucle qui liste les news
    ?>
    et je souhaiterais avoir un tableau pour chaque date différente donc j'ai fai ce code mais ca ne fonctionne pas, voici le code :

    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
    25
    26
    27
    <?php
    $indice = 0;
    $retour = mysql_query('SELECT *, DATE_FORMAT(date, "%d/%m/%Y") AS date_fr  FROM gardespv ORDER BY date DESC');
    while ($donnees = mysql_fetch_array($retour))
    {
      if($donnees['valide'] == 'Oui')
      {
        $style= 'background-color: green;';
      }
      else
      {
      $style = 'background-color: #ffffff';
      }
     
    $data = explode('/', $donnees['date_fr']);
    $number = intval($data[1]);
    ${'tableau'.$number} .= '<tr style="'.$style.'">\n<td><a href="rediger_SVP.php?modifier_garde='.$donnees['id'].'"><img src="button_edit.png"/></a></td>\n<td><a href="liste_SVP.php?supprimer_garde='.$donnees['id'].'"><img src="button_drop.png"/></a></td>\n<td>'.$donnees['nom'].'</td>\n<td>'.$donnees['date_fr'].'</td>\n<td>'.$donnees['horaire'].'</td>\n<td>'.$donnees['valide'].'</td>\n<td>'.$donnees['annule'].'</td>\n</tr>\n\n';
     
    }// Fin de la boucle qui liste les news
     
    $compteur = 1;
    while($compteur <= 12)
    {
    echo ${'tableau'.$compteur};
    $compteur++;
    }
    ?>
    mais ça ne fonctionne je ne vois pas pourquoi !!!

  2. #2
    Membre chevronné Avatar de SphynXz
    Développeur Web
    Inscrit en
    Mars 2008
    Messages
    439
    Détails du profil
    Informations personnelles :
    Âge : 39

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Mars 2008
    Messages : 439
    Par défaut
    ca ne fonctionne pas, c'est plutôt vague!

    qu'est ce qui ne fonctionne pas?

    quel résultat à tu à l'ecran?

  3. #3
    Membre éclairé
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Février 2007
    Messages
    758
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : Finance

    Informations forums :
    Inscription : Février 2007
    Messages : 758
    Par défaut
    voila le message d'erreur :

    Notice: Undefined offset: 1 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 124

    Notice: Undefined variable: tableau0 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 125

    Notice: Undefined offset: 1 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 124

    Notice: Undefined offset: 1 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 124

    Notice: Undefined offset: 1 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 124

    Notice: Undefined offset: 1 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 124

    Notice: Undefined variable: tableau1 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 132

    Notice: Undefined variable: tableau2 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 132

    Notice: Undefined variable: tableau3 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 132

    Notice: Undefined variable: tableau4 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 132

    Notice: Undefined variable: tableau5 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 132

    Notice: Undefined variable: tableau6 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 132

    Notice: Undefined variable: tableau7 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 132

    Notice: Undefined variable: tableau8 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 132

    Notice: Undefined variable: tableau9 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 132

    Notice: Undefined variable: tableau10 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 132

    Notice: Undefined variable: tableau11 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 132

    Notice: Undefined variable: tableau12 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 132


    et voici la ligne 124 :
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
     
          $number = intval($data[1]);

    125 :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
        ${'tableau'.$number} .= '<tr style="'.$style.'">\n<td><a href="rediger_SVP.php?modifier_garde='.$donnees['id'].'"><img src="button_edit.png"/></a></td>\n<td><a href="liste_SVP.php?supprimer_garde='.$donnees['id'].'"><img src="button_drop.png"/></a></td>\n<td>'.$donnees['nom'].'</td>\n<td>'.$donnees['date_fr'].'</td>\n<td>'.$donnees['horaire'].'</td>\n<td>'.$donnees['valide'].'</td>\n<td>'.$donnees['annule'].'</td>\n</tr>\n\n';

    et 132 :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    echo ${'tableau'.$compteur};

  4. #4
    Membre chevronné Avatar de SphynXz
    Développeur Web
    Inscrit en
    Mars 2008
    Messages
    439
    Détails du profil
    Informations personnelles :
    Âge : 39

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Mars 2008
    Messages : 439
    Par défaut
    fait un var_dump($data); après ton $data = explode... et affiche nous le résultat

  5. #5
    Membre éclairé
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Février 2007
    Messages
    758
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : Finance

    Informations forums :
    Inscription : Février 2007
    Messages : 758
    Par défaut
    Code X : 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
    25
    array(3) { [0]=>  string(2) "15" [1]=>  string(2) "11" [2]=>  string(4) "2009" }
    Notice: Undefined variable: tableau11 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 126
    array(3) { [0]=> string(2) "15" [1]=> string(2) "11" [2]=> string(4) "2008" } array(3) { [0]=> string(2) "14" [1]=> string(2) "04" [2]=> string(4) "2008" }
    Notice: Undefined variable: tableau4 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 126
    array(3) { [0]=> string(2) "20" [1]=> string(2) "03" [2]=> string(4) "2008" }
    Notice: Undefined variable: tableau3 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 126
    array(3) { [0]=> string(2) "17" [1]=> string(2) "03" [2]=> string(4) "2008" } array(3) { [0]=> string(2) "17" [1]=> string(2) "03" [2]=> string(4) "2008" } array(3) { [0]=> string(2) "17" [1]=> string(2) "02" [2]=> string(4) "2008" }
    Notice: Undefined variable: tableau2 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 126
    array(3) { [0]=> string(2) "14" [1]=> string(2) "12" [2]=> string(4) "2005" }
    Notice: Undefined variable: tableau12 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 126
    array(3) { [0]=> string(2) "02" [1]=> string(2) "03" [2]=> string(4) "2004" }
    Notice: Undefined variable: tableau1 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 133
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    Notice: Undefined variable: tableau5 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 133
    
    Notice: Undefined variable: tableau6 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 133
    
    Notice: Undefined variable: tableau7 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 133
    
    Notice: Undefined variable: tableau8 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 133
    
    Notice: Undefined variable: tableau9 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 133
    
    Notice: Undefined variable: tableau10 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 133
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

    à la ligne 126 :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    ${'tableau'.$number} .= '<tr style="'.$style.'">\n<td><a href="rediger_SVP.php?modifier_garde='.$donnees['id'].'"><img src="button_edit.png"/></a></td>\n<td><a href="liste_SVP.php?supprimer_garde='.$donnees['id'].'"><img src="button_drop.png"/></a></td>\n<td>'.$donnees['nom'].'</td>\n<td>'.$donnees['date_fr'].'</td>\n<td>'.$donnees['horaire'].'</td>\n<td>'.$donnees['valide'].'</td>\n<td>'.$donnees['annule'].'</td>\n</tr>\n\n';
    à la ligne 133 :

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    echo ${'tableau'.$compteur};

  6. #6
    Membre chevronné Avatar de SphynXz
    Développeur Web
    Inscrit en
    Mars 2008
    Messages
    439
    Détails du profil
    Informations personnelles :
    Âge : 39

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Mars 2008
    Messages : 439
    Par défaut
    Code php : Sélectionner tout - Visualiser dans une fenêtre à part
    ${'tableau'.$number} .=

    le problème est ici !

    tes variables tableau1, tableau2 , tableau11...

    elle ne sont pas initialisés et t souhaite déjà les compléter!

    retire le point et voit ce que cela donne

  7. #7
    Membre éclairé
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Février 2007
    Messages
    758
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : Finance

    Informations forums :
    Inscription : Février 2007
    Messages : 758
    Par défaut
    voila c'est fait mais maintenant j'obtient toutes les données de ma table les une à la suite de l'autre ;

    array(3) { [0]=> string(2) "15" [1]=> string(2) "11" [2]=> string(4) "2009" } array(3) { [0]=> string(2) "15" [1]=> string(2) "11" [2]=> string(4) "2008" } array(3) { [0]=> string(2) "14" [1]=> string(2) "04" [2]=> string(4) "2008" } array(3) { [0]=> string(2) "20" [1]=> string(2) "03" [2]=> string(4) "2008" } array(3) { [0]=> string(2) "17" [1]=> string(2) "03" [2]=> string(4) "2008" } array(3) { [0]=> string(2) "17" [1]=> string(2) "03" [2]=> string(4) "2008" } array(3) { [0]=> string(2) "17" [1]=> string(2) "02" [2]=> string(4) "2008" } array(3) { [0]=> string(2) "14" [1]=> string(2) "12" [2]=> string(4) "2005" } array(3) { [0]=> string(2) "02" [1]=> string(2) "03" [2]=> string(4) "2004" }

  8. #8
    Membre chevronné Avatar de SphynXz
    Développeur Web
    Inscrit en
    Mars 2008
    Messages
    439
    Détails du profil
    Informations personnelles :
    Âge : 39

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Mars 2008
    Messages : 439
    Par défaut
    enlève le var_dump que je t'ai demandé d'inscrire

  9. #9
    Membre éclairé
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Février 2007
    Messages
    758
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : Finance

    Informations forums :
    Inscription : Février 2007
    Messages : 758
    Par défaut
    J'ai ce message maintenant :

    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n
    Notice: Undefined variable: tableau5 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 134

    Notice: Undefined variable: tableau6 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 134

    Notice: Undefined variable: tableau7 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 134

    Notice: Undefined variable: tableau8 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 134

    Notice: Undefined variable: tableau9 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 134

    Notice: Undefined variable: tableau10 in c:\program files\easyphp1-7\www\gestrh\liste_spv.php on line 134
    \n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n

    MAIS j'ai remarquer que les talbeaux concernais les mois que je n'avais pas enregistré, car à la suite de la page s'affiche un tableau avec les autres mois, mais le tableau n'est pas séparé !!

    je comprend plus rien

  10. #10
    Membre chevronné Avatar de SphynXz
    Développeur Web
    Inscrit en
    Mars 2008
    Messages
    439
    Détails du profil
    Informations personnelles :
    Âge : 39

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Mars 2008
    Messages : 439
    Par défaut
    reglons les choses une par une

    d'une part, je te conseille d'utiliser la boucle for lorsque tu connais tout les paramètre de la boucle (le départ, la fin, le saut)

    Code php : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    while($compteur <= 12)
    {
    echo ${'tableau'.$compteur};
    $compteur++;
    }

    devient

    Code php : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
     
    for($compteur=1;$compteur <= 12;$compteur++)
    {
    echo ${'tableau'.$compteur};
    }

    on pourrait encore nettoyer ce dernier code sur plusieurs endroits mais je ne veux pas t'enmeler les pinceaux

    à présent le message d'erreur, tu l'as très bien compris, il provient du fait que certaines variables n'existe pas, à savoir celles pour lesquels tu n'a pas de moi. si le moi de mars est absent sur ta table, la variable tableau3 n'existera pas! on va don vérifier si ce que l'on veut afficher existe! gràce à la fonction isset !

    ton code doit alors être comme cela :

    Code php : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
     
    for($compteur=1;$compteur <= 12;$compteur++)
    {
    if( isset( ${'tableau'.$compteur} ) )
    {
    echo ${'tableau'.$compteur};
    }
    }

    épuré ce code serait comme cela :


    Code php : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
     
    for($compteur=1;$compteur <= 12;$compteur++)
    echo (isset(${'tableau'.$compteur}))?${'tableau'.$compteur};

    et pour ce qui est de ton problème de décalage, c'est du pur html. et je te conseille de revoir les tableaux parce que je ne vois ni <table> ni <thead> ou encore <tbody>

  11. #11
    Membre éclairé
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Février 2007
    Messages
    758
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : Finance

    Informations forums :
    Inscription : Février 2007
    Messages : 758
    Par défaut
    D'accord merçi pour ton aide, j'ai donc effectué toutes les modifications, mais j'ai remarqué que je n'ai plus de message d'erreur seulement des /n/n/n/n/n avant mon tableau, et dans mon tableau il n'y a que quelque un de mes enregistrment qui s'affiche, mais merçi beaucoup pour ton aide, je vais essayer de chercher pourquoi les autres ne s'affiche pas et ne se sépare pas, dans différent tableau !

    par contre il a bien les <td> et <th>

    je publie le code actuel,

    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
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    <table><tr bgcolor="#FFCC66">
    <th>Modifier</th>
    <th>Supprimer</th>
    <th>nom</th>
    <th>Date</th>
    <th>Horaires</th>
    <th>Validé</th>
    <th>Annule</th>
    </tr>
    <?php
    $indice = 0;
    $retour = mysql_query('SELECT *, DATE_FORMAT(date, "%d/%m/%Y") AS date_fr  FROM gardespv ORDER BY date DESC');
    while ($donnees = mysql_fetch_array($retour))
    {
      if($donnees['valide'] == 'Oui')
      {
        $style= 'background-color: green;';
      }
      else
      {
      $style = 'background-color: #ffffff';
      }
     
    $data = explode('/', $donnees['date_fr']);
    $number = intval($data[1]);
    ${'tableau'.$number} = '<tr style="'.$style.'">\n<td><a href="rediger_SPV.php?modifier_garde='.$donnees['id'].'"><img src="button_edit.png"/></a></td>\n<td><a href="liste_SPV.php?supprimer_garde='.$donnees['id'].'"><img src="button_drop.png"/></a></td>\n<td>'.$donnees['nom'].'</td>\n<td>'.$donnees['date_fr'].'</td>\n<td>'.$donnees['horaire'].'</td>\n<td>'.$donnees['valide'].'</td>\n<td>'.$donnees['annule'].'</td>\n</tr>\n\n';
     
    }// Fin de la boucle qui liste les news
     
    $compteur = 1;
    for($compteur=1;$compteur <= 12;$compteur++)
    {
    if( isset( ${'tableau'.$compteur} ) )
    {
    echo ${'tableau'.$compteur};
    }
    }
     
    ?>
    </table>
    </body>

  12. #12
    Membre chevronné Avatar de SphynXz
    Développeur Web
    Inscrit en
    Mars 2008
    Messages
    439
    Détails du profil
    Informations personnelles :
    Âge : 39

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Mars 2008
    Messages : 439
    Par défaut
    c'est possible que tu affiche ici le code sources généré par ton navigateur?

  13. #13
    Membre éclairé
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Février 2007
    Messages
    758
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : Finance

    Informations forums :
    Inscription : Février 2007
    Messages : 758
    Par défaut
    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
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
     
     
     
    <html>
     
    <head>
    <meta http-equiv="Content-Language" content="fr">
    <meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
    <title>Les ressources humaines</title>
    </head>
     
    <body bgcolor="#6699FF">
     
    <p><font face="Rockwell" size="6">G'RH - CIS HAYANGE </font></p>
    <p><a href="index.php"><img border="0" src="Acc.png"></a>&nbsp;&nbsp;&nbsp;
    <a href="liste_news.php"><img border="0" src="pers.png"></a>&nbsp;&nbsp;&nbsp;
    <a href="liste_SPV.php"><img border="0" src="garde.png"></a>&nbsp;&nbsp;&nbsp;
     
    <a href="liste_REGISTRE.php"><img border="0" src="sai.png"></a>&nbsp;&nbsp;&nbsp;
    <a href="search.php"><img border="0" src="voi.png"></a></p>&nbsp;&nbsp;&nbsp;
    </body>
     
    </html>
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" >
       <head>
           <title>Gardes SPV</title>
            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
            <style type="text/css">
            h2, th, td
            {
                text-align:center;
            }
            table
            {
                border-collapse:collapse;
                border:2px solid black;
                margin:auto;
            }
            th, td
            {
                border:1px solid black;
            }
            a img { 
      border-width : 0; 
    }
            </style>
     
        </head>
     
        <body>
     
    <h2><a href="rediger_SPV.php"><img src="ajout.png"></a></h2>
    <h2><a href="liste_SPV_date.php">Chercher une date</a></h2>
     
     
    <table><tr bgcolor="#FFCC66">
    <th>Modifier</th>
    <th>Supprimer</th>
    <th>nom</th>
     
    <th>Date</th>
    <th>Horaires</th>
    <th>Validé</th>
    <th>Annule</th>
    </tr>
    <tr style="background-color: #ffffff">\n<td><a href="rediger_SPV.php?modifier_garde=17"><img src="button_edit.png"/></a></td>\n<td><a href="liste_SPV.php?supprimer_garde=17"><img src="button_drop.png"/></a></td>\n<td>ADDIS Nicolas</td>\n<td>11/01/2008</td>\n<td>8</td>\n<td></td>\n<td></td>\n</tr>\n\n<tr style="background-color: #ffffff">\n<td><a href="rediger_SPV.php?modifier_garde=19"><img src="button_edit.png"/></a></td>\n<td><a href="liste_SPV.php?supprimer_garde=19"><img src="button_drop.png"/></a></td>\n<td>ADDIS Nicolas</td>\n<td>01/02/2008</td>\n<td></td>\n<td></td>\n<td></td>\n</tr>\n\n<tr style="background-color: green;">\n<td><a href="rediger_SPV.php?modifier_garde=11"><img src="button_edit.png"/></a></td>\n<td><a href="liste_SPV.php?supprimer_garde=11"><img src="button_drop.png"/></a></td>\n<td>ADDIS Nicolas</td>\n<td>02/03/2004</td>\n<td>23</td>\n<td>Oui</td>\n<td></td>\n</tr>\n\n<tr style="background-color: green;">\n<td><a href="rediger_SPV.php?modifier_garde=15"><img src="button_edit.png"/></a></td>\n<td><a href="liste_SPV.php?supprimer_garde=15"><img src="button_drop.png"/></a></td>\n<td>ADDIS Nicolas</td>\n<td>14/04/2008</td>\n<td>8-20</td>\n<td>Oui</td>\n<td></td>\n</tr>\n\n<tr style="background-color: #ffffff">\n<td><a href="rediger_SPV.php?modifier_garde=14"><img src="button_edit.png"/></a></td>\n<td><a href="liste_SPV.php?supprimer_garde=14"><img src="button_drop.png"/></a></td>\n<td>DORSCHNER Jonathan</td>\n<td>15/11/2008</td>\n<td>8-20</td>\n<td></td>\n<td></td>\n</tr>\n\n<tr style="background-color: green;">\n<td><a href="rediger_SPV.php?modifier_garde=9"><img src="button_edit.png"/></a></td>\n<td><a href="liste_SPV.php?supprimer_garde=9"><img src="button_drop.png"/></a></td>\n<td>WEISS Florent</td>\n<td>14/12/2005</td>\n<td>24</td>\n<td>Oui</td>\n<td></td>\n</tr>\n\n</table>
     
    </body>
    </html>

  14. #14
    Membre chevronné Avatar de SphynXz
    Développeur Web
    Inscrit en
    Mars 2008
    Messages
    439
    Détails du profil
    Informations personnelles :
    Âge : 39

    Informations professionnelles :
    Activité : Développeur Web

    Informations forums :
    Inscription : Mars 2008
    Messages : 439
    Par défaut
    à la place de :

    echo ${'tableau'.$compteur};

    fait :

    echo nl2br(${'tableau'.$compteur});

  15. #15
    Membre éclairé
    Homme Profil pro
    Développeur .NET
    Inscrit en
    Février 2007
    Messages
    758
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Alpes Maritimes (Provence Alpes Côte d'Azur)

    Informations professionnelles :
    Activité : Développeur .NET
    Secteur : Finance

    Informations forums :
    Inscription : Février 2007
    Messages : 758
    Par défaut
    rien n'y change

Discussions similaires

  1. [PHP 5.3] trier un tableau par date
    Par aicou dans le forum Langage
    Réponses: 2
    Dernier message: 23/05/2011, 14h47
  2. classer les fichiers d'un tableau par date
    Par totofe49 dans le forum Langage
    Réponses: 4
    Dernier message: 16/05/2011, 14h39
  3. Trier un tableau par date
    Par totofe49 dans le forum Langage
    Réponses: 2
    Dernier message: 27/09/2010, 12h00
  4. Afficher un tableau par date de création
    Par mathias59 dans le forum Langage
    Réponses: 6
    Dernier message: 16/04/2010, 18h11
  5. Recherche dans un tableau par date et modification
    Par Alec dans le forum Macros et VBA Excel
    Réponses: 2
    Dernier message: 13/06/2008, 14h11

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo