website logo
Auteur
avatar
Tito

Forum » » Le coin des codeurs » » [Résolu] - Champ inconnu


Posté : 08-03-2007 19:38 icone du post

Versi corrigée :


<?php
$query 
mysql_query("SELECT * FROM table");
$row = mysql_fetch_assoc($query));
echo '<table><tr>';
foreach($row as $nom=>$col) echo '<th>'.$nom.'&a mp;l t;/th>';
echo '</tr><tr>';
foreach($row as $col) echo '<td>'.$nom.'</td>  ';
echo '</tr>';
while($row = mysql_fetch_assoc($query)) 
{
    echo '<tr>';
    foreach($row as $col) echo '<t  d>'.$col.'</td>';
    echo '</tr>';
}
echo '</table>';
?>



Cet article provient de NPDS REvolution 16
https://lab.grottes-et-karsts-de-chine.org/viewtopic.php?topic=22053&forum=5