Bonjour, je voudrais faire un tableau dynamique qui affiche de images provenant de ma BDD.
L'affichage se fait en 3 lignes, 4 colonnes.

Voici le code que j'ai fait mais il y a un souci.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
<?php
	echo "<table width=\"99%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
 
		$nbColonnes= 2;
		$nbLignes = 2;
 
                   for ($i = 0; $i<=$nbLignes; $i++){
 
                           while($data= mysql_fetch_assoc($retour_messages)){
				 echo "<tr>";
 
                                  for ($j = 0; $j<=$nbLignes; $j++){
					echo "<td>"; ?>
						<div> <a href="#">
                                                <img src="photos/<?php echo $data['photo']?>" /><br />
							/div>
			                <?php   echo "</td>";
 
                                    }
 
			         echo "</tr>";
				    }
                                }
	echo "</table>";
?>