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 |
|---|---|
Sujet posté par rer le 09/01/2009 à 10h40'27 |
![]() |
Sujet posté par f6net le 08/01/2009 à 09h56'46 |
![]() |
Sujet posté par depanmonpc le 07/01/2009 à 16h48'11 |
![]() |
Réponse postée par xerses le 07/01/2009 à 00h29'37 |
![]() |
Réponse postée par tieno le 04/01/2009 à 18h05'36 |
![]() |
Réponse postée par root le 02/01/2009 à 16h47'50 |
![]() |
Réponse postée par xerses le 01/01/2009 à 20h16'20 |
![]() |
Réponse postée par ced51 le 27/12/2008 à 12h18'48 |
![]() |
Sujet posté par ced51 le 26/12/2008 à 17h44'42 |
![]() |
Sujet posté par rer le 24/12/2008 à 10h08'30 |
![]() |