website logo
Auteur
avatar
Tito

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


Posté : 8 mars 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.'&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
https://www.npds.org/viewtopic.php?topic=22053&forum=5