Précédent   Forum des professionnels en informatique > PHP > Langage > Syntaxe
Syntaxe Forum d'entraide sur la syntaxe de PHP et la POO. Avant de poster -> FAQ syntaxe, Cours d'initiation et cours de POO
Partagez cette discussion sur d'autres réseaux sociaux : Viadeo Twitter Google Facebook Digg Delicious MySpace Yahoo
Réponse Proposer ce sujet en actualité
 
Outils de la discussion
Publicité
'
Vieux 14/12/2007, 00h32   #1
Invité de passage
 
Inscription : juin 2006
Messages : 5
Détails du profil
Informations forums :
Inscription : juin 2006
Messages : 5
Points : 1
Points : 1
Par défaut problème alignement données

bonjour voici un code qui affiche une série de coup de cœur pour un site immobilier cependant il affiche les données verticalement alors que je les veux de façon horizontale
voici le code si quelqu'un peut m'aider :

Code :
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
<?php   
 
// CNX et récupération des informations relatives aux coups de coeurs  
 require_once("db_connect.php");
 //Requete des images 
 
 
 
 //Recuperation des donnees de coup2coeur et typeBien
 $sql="SELECT * FROM coup2coeur C,typebien T
     WHERE T.ref_bien=C.ref_bien";
 $query=mysql_query($sql);
 echo'<span>nos coups de coeur</span>';
 echo'</br>';
//Affichage des données 
 while($data=mysql_fetch_array($query))
 {
 echo'<div><table width="200" border="0" cellspacing="1" cellpadding="2">
  <tr>
    <th width="97" rowspan="3" scope="col">'; 
	$requete = 'SELECT ref_bien,img_nom FROM image   WHERE ref_bien like'." '".$data['ref_bien']."'LIMIT 0,1";
$fetch=mysql_query($requete);
		while ($data1= mysql_fetch_array($fetch)) 
			{ 	
			  	 echo '  <img class=cadre_image src="./images/'.$data1['ref_bien']."/".$data1['img_nom'].'" width="80"
           	 height="60">';
 
			 };
 
	echo'</th>
    <th width="31" scope="col" class="cadre_blanc">'.$data['type'].'</th>
  </tr>
  <tr>
    <th scope="col">'.substr($data['description'],0,34).'...</th>
	  </tr>
	  <tr>
	  <th scope="col">Prix: '.$data['prix'].'CFA'.'</th>
	</tr>
  <tr align="center">
    <th scope="col" > <a href="coup2coeur.php#'.$data['ref_bien'].'" target="_self"">ReF: '.$data['ref_bien'];
	echo'</a></th>
  </tr>
</table></div>';
 
 
 }
 ?>
jponline est déconnecté   Envoyer un message privé Réponse avec citation 00
Vieux 14/12/2007, 09h06   #2
Membre chevronné
 
Avatar de cadoudal56
 
Inscription : février 2005
Messages : 671
Détails du profil
Informations personnelles :
Âge : 40

Informations forums :
Inscription : février 2005
Messages : 671
Points : 646
Points : 646
Essaie comme ceci pour voir :

Code :
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
 
echo'<div><table border="0" cellspacing="1" cellpadding="2"><tr>';
while($data=mysql_fetch_array($query))
 {
 
   echo'
    <th width="97" rowspan="3" scope="col">'; 
	$requete = 'SELECT ref_bien,img_nom FROM image   WHERE ref_bien like'." '".$data['ref_bien']."'LIMIT 0,1";
$fetch=mysql_query($requete);
		while ($data1= mysql_fetch_array($fetch)) 
			{ 	
			  	 echo '  <img class=cadre_image src="./images/'.$data1['ref_bien']."/".$data1['img_nom'].'" width="80"
           	 height="60">';
 
			 };
 
	echo'</th>
    <th width="31" scope="col" class="cadre_blanc">'.$data['type'].'</th>
  </tr>
  <tr>
    <th scope="col">'.substr($data['description'],0,34).'...</th>
	  </tr>
	  <tr>
	  <th scope="col">Prix: '.$data['prix'].'CFA'.'</th>
	</tr>
  <tr align="center">
    <th scope="col" > <a href="coup2coeur.php#'.$data['ref_bien'].'" target="_self"">ReF: '.$data['ref_bien'];
	echo'</a></th>
  ';
}
echo'</tr></table></div>';
@+
cadou
__________________
PHP Competition System
Script de gestion de coupes et championnats
http://phpcompet.free.fr

Mon jeu de foot
cadoudal56 est déconnecté   Envoyer un message privé Réponse avec citation 00
Réponse Proposer ce sujet en actualité
Outils de la discussion



Fuseau horaire GMT +2. Il est actuellement 02h40.


 
 
 
 
Partenaires

Hébergement Web