Accueil du forum » PHP » Images + php [Réglé]
________________
karim
<?php
$req_img = mysql_query("select * from images where id_article='$art[id]' order by id ASC");
$i=1;
while ($img = mysql_fetch_assoc($req_img)) {
$aff = $img["src"];
$nb = mysql_num_rows($req_img);
$nombre_images_total = $nb;
$nombre_images_par_ligne = 4;
?>
<a href="javascript:popupImage('images/articles/<?php echo $aff; ?>')"><img src="images/articles/<?php echo $aff; ?>" width="140" height="110" border="0" alt="Cliquez ici pour ouvrir"></a>
<?php
if ($i % $nombre_images_par_ligne == 0) {
echo "<hr />";
}
$i++;
}
?>
________________
Fondateur de Net-Pratique,
Ancien webmaster.
Statut:
Administrateur/Webmaster

________________
karim
<?php
$nombre_images_par_ligne = 4;
$req_img = mysql_query("select * from images where id_article='".$art["id"]."' order by id ASC");
$nombre_images_total = mysql_num_rows($req_img);
if ($nombre_images_total > 0) {
$i=1;
while ($img = mysql_fetch_assoc($req_img)) {
$aff = $img["src"];
?>
<a href="javascript:popupImage('images/articles/<?php echo $aff; ?>')"><img src="images/articles/<?php echo $aff; ?>" width="140" height="110" border="0" alt="Cliquez ici pour ouvrir"></a>
<?php
if ($i % $nombre_images_par_ligne == 0) {
echo "<hr />";
}
$i++;
}
}
?>
________________
Fondateur de Net-Pratique,
Ancien webmaster.
Statut:
Administrateur/Webmaster

________________
Anything that can go wrong will go wrong (Murphy)
Statut:
Modérateur

________________
karim
- Les conditions générales d'utilisation du site
| Sujet | Forum |
|---|---|
Réponse postée par raptor le 27/11/2008 à 20h39'51 |
![]() |
Réponse postée par tieno le 26/11/2008 à 14h54'54 |
![]() |
Réponse postée par tieno le 23/11/2008 à 13h55'24 |
![]() |
Sujet posté par touret le 13/11/2008 à 08h58'09 |
![]() |
Réponse postée par xerses le 09/11/2008 à 18h57'14 |
![]() |
Réponse postée par unit le 03/11/2008 à 15h53'53 |
![]() |
Réponse postée par froogy le 26/10/2008 à 16h40'03 |
![]() |
Réponse postée par rer le 23/10/2008 à 16h11'03 |
![]() |
Réponse postée par 1cyril le 19/10/2008 à 19h26'02 |
![]() |
Réponse postée par xerses le 13/10/2008 à 12h41'06 |
![]() |