Bonjour,
J'affiche des commentaires qui sont récupérés à partir d'une BDD
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| $sql6 = 'SELECT commentaire FROM xxx where xxxx = xxxx ;
$requete6 = mysql_query( $sql6, $link ) or die( "ERREUR MYSQL numéro: ".mysql_errno()."<br>Type de cette erreur: ".mysql_error()."<br>\n" );
$i = 0;
$table6 =array();
//tant qu'il y a des points à manger
while ($row6 = mysql_fetch_array($requete6)){
array_push($table6,$row6);
}
$total_table6 = count($table6);
for ($i=0; $i < $total_table6; $i++)
{
$commentaire = $table6[$i]['commentaire'];
} |
puis j'affiche le resultat dans un tableau
<tr><td>Commentaires</td><td> : '.$commentaire.'</td></tr>
Ca fonctionne sauf qu’il n'affiche que le dernier commentaire qu'il a traite dans la boucle "for".
Comment faire pour que tous les commentaires apparaissent?
Merci
Partager