1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
|
echo'<table border="1" bgcolor=grey>';
$retour = requete_sql('SELECT id_photo,nom_photo,url FROM PHOTO GROUP BY id_photo DESC');
$i=0;
while ($donnees = mysql_fetch_array($retour)) // On fait une boucle pour lister les photos
{
$nom=($donnees['nom_photo']);
$url=$donnees['url'];
$i++;
if (($i % 5) == 0)
{
echo'<tr>';
}
echo"<td><a href=../../".$url."><img title=\"$nom\" height=75 width=75 src=../../".$url." /></a>";
echo'</td>';
if (($i % 5) == 0)
{
echo'</tr>';
}
}
echo'</table>'; |