Bonjour,

Je fais appel à une table pour faire apparaitre des images
Je veux faire apparaitre 2 images par ligne, soit en langage bootstrap 2 colonnes par ligne

en css bootstrap:
<div class="row"> équivaut à une nouvelle ligne
<div class="col-lg-6"> équivaut à une colonne

Avec le code suivant ... <div class="row"> n apparait pas
Pouvez vous m aider?
Cordialement

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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
		<?php
			// Connexion bdd
			include('./connexion-a2bis.php');
 
			//Compter le nombre d'nregistrement dans la table
			$sql1 = 'SELECT count(*) FROM `ad_realisations`'; 
			$requete1 = $connexion_bdd->prepare($sql1); 
			$requete1->execute(); 
			$number_of_rows = $requete1->fetchColumn();
			echo $number_of_rows;
 
			$sql2 = 'SELECT * FROM ad_realisations WHERE typologie_realisation=?';
			$requete2 = $connexion_bdd ->prepare($sql2);
			//Associer des valeurs aux place holders
			$requete2->bindValue(1, 'pariculier', PDO::PARAM_STR);
 
			//Compiler et executer la requete
			$requete2->execute();
			//Recuperer toutes les donnees retournees
			$i=0;
			foreach($requete2->fetchAll() as $donnee)
			{
			$i=$i++;
			if (!is_int($i/2) && ($number_of_rows-$i>0))
			{
		?>
	<div class="row">
		<div class="col-lg-6">
			<h3><?php echo $donnee['titre_realisation']; ?></h3>
			<figure>
				<img class="image100" src="../Upload-Ajax-ABCI/Destination_Upload1/<?php echo $donnee['nom_image_realisation'];?>_max.<?php echo $donnee['ext_image_realisation']; ?>" alt="<?php echo $donnee['titre_realisation']; ?>" title="<?php echo $donnee['titre_realisation']; ?>" />
				<figcaption class="taillelegende"><p><?php echo $donnee['descriptif_realisation']; ?></p></figcaption>
			</figure>
		</div>
		<?php
			}
			elseif (is_int($i/2) && ($number_of_rows-$i>0))
			{
		?>
		<div class="col-lg-6">
			<h3><?php echo $donnee['titre_realisation']; ?></h3>
			<figure>
				<img class="image100" src="../Upload-Ajax-ABCI/Destination_Upload1/<?php echo $donnee['nom_image_realisation'];?>_max.<?php echo $donnee['ext_image_realisation']; ?>" alt="<?php echo $donnee['titre_realisation']; ?>" title="<?php echo $donnee['titre_realisation']; ?>" />
				<figcaption class="taillelegende"><p><?php echo $donnee['descriptif_realisation']; ?></p></figcaption>
			</figure>
		</div>
	</div>
		<?php
			}
			elseif (!is_int($i/2) && ($number_of_rows-$i<0))
			{
		?>
		<div class="col-lg-6">
			<h3><?php echo $donnee['titre_realisation']; ?></h3>
			<figure>
				<img class="image100" src="../Upload-Ajax-ABCI/Destination_Upload1/<?php echo $donnee['nom_image_realisation'];?>_max.<?php echo $donnee['ext_image_realisation']; ?>" alt="<?php echo $donnee['titre_realisation']; ?>" title="<?php echo $donnee['titre_realisation']; ?>" />
				<figcaption class="taillelegende"><p><?php echo $donnee['descriptif_realisation']; ?></p></figcaption>
			</figure>
		</div>
		<div class="col-lg-6">
			<!-- colonne vide-->
		</div>
	</div>
		<?php
			}
			elseif (is_int($i/2) && ($number_of_rows-$i<0))
			{
		?>	
		<div class="col-lg-6">
			<h3><?php echo $donnee['titre_realisation']; ?></h3>
			<figure>
				<img class="image100" src="../Upload-Ajax-ABCI/Destination_Upload1/<?php echo $donnee['nom_image_realisation'];?>_max.<?php echo $donnee['ext_image_realisation']; ?>" alt="<?php echo $donnee['titre_realisation']; ?>" title="<?php echo $donnee['titre_realisation']; ?>" />
				<figcaption class="taillelegende"><p><?php echo $donnee['descriptif_realisation']; ?></p></figcaption>
			</figure>
		</div>
	</div>
		<?php
			}
		?>
 
		<?php
			}			
			//Clore la requete preparee
			$requete1 -> closeCursor();
			$requete1 = NULL;
 
			$requete2 -> closeCursor();
			$requete2 = NULL;
		?>