Page 1 sur 1

Tableau PHP

Posté : 07 mai 2006, 16:44
par Dom!
Bonjour,

J'ai fais ceci :
   <? 
$sqldip = 'select nom, prenom, id_membre, list_id_bureau, photo_p from tb_membres where list_id_bureau <> ""';
   // $nbsql += 1;
	if ($resselectdip = mysql_query($sqldip)) {
		while ($selectdip = mysql_fetch_array($resselectdip))
         {
				$tableau = "";
				$tableau = explode(",", $selectdip["list_id_bureau"]);
				$temp = "";
								 
				for ($cpt=0; $cpt < count($tableau); $cpt++) 
  			//$tab[$tableau[$cpt]] = $tab[$tableau[$cpt]].strtoupper($selectdip["nom"])." ".$selectdip["prenom"]." <br>";
			$tab[$tableau[$cpt]] .= strtoupper($selectdip["nom"]) . ' ' . $selectdip['prenom'] . ' <br>' . '<img src="' . $selectdip['photo_p'] . '"/>';
        }
    }
	
	print '<table width="100%" border="0" cellspacing="25" cellpadding="0">';
	$sqldip = 'select id, libelle from tb_bureau order by ordre';
	
	if ($resselectdip = mysql_query($sqldip)) {
		while ($selectdip = mysql_fetch_array($resselectdip))
         {
	print '<tr class="parag"><td width="20%" align="center" valign="top"><font color=" #000000"><strong>'.$selectdip["libelle"].'</strong></font></td>
	<tr class="parag"><td width="20%" align="center" valign="top"><font color=" #000000"><strong>'.$selectdip["libelle"].'</strong></font></td>
	<td width="30%" valign="top">'.$tab[$selectdip["id"]].'<br></td></tr>';
		 }
	}

?>
Comment faire pour qu'aprés la photo il y est un retour à la ligne ? merci pour votre aide

Posté : 07 mai 2006, 18:44
par Truc
Un <br> en fin de ligne :D

Posté : 08 mai 2006, 10:43
par Dom!
Ca ne fonctionne pas !

je remet le code que j'ai rectifié :
   <? 
$sqldip = 'select nom, prenom, id_membre, list_id_bureau, photo_p from tb_membres where list_id_bureau <> ""';
   // $nbsql += 1;
	if ($resselectdip = mysql_query($sqldip)) {
		while ($selectdip = mysql_fetch_array($resselectdip))
         {
				$tableau = "";
				$tableau = explode(",", $selectdip["list_id_bureau"]);
				$temp = "";
								 
				for ($cpt=0; $cpt < count($tableau); $cpt++) 
  			//$tab[$tableau[$cpt]] = $tab[$tableau[$cpt]].strtoupper($selectdip["nom"])." ".$selectdip["prenom"]." <br>";
			$tab[$tableau[$cpt]] .= strtoupper($selectdip["nom"]) . ' ' . $selectdip['prenom'] . ' <br />' . '<img src="' . $selectdip['photo_p'] . '" <br>';
        }
    }
	
	print '<table width="100%" border="0" cellspacing="25" cellpadding="0">';
	$sqldip = 'select id, libelle from tb_bureau order by ordre';
	
	if ($resselectdip = mysql_query($sqldip)) {
		while ($selectdip = mysql_fetch_array($resselectdip))
         {
	print '<tr class="parag"><td width="20%" align="center" valign="top"><font color=" #000000"><strong>'.$selectdip["libelle"].'</strong></font></td><td width="30%" valign="top">'.$tab[$selectdip["id"]].'<br /></td></tr>';
		 }
	}

?>
Je ne comprend pas pourquoi je galére sur un truc aussi bête !
Merci pour votre aide

Posté : 08 mai 2006, 10:52
par Ryle
lol, il a dit APRES la photo, pas DANS la photo ;)

tu as perdu la partie fermante de ton tag image en route :)

Posté : 08 mai 2006, 10:55
par Dom!
Maiiiiiiiiiiiiiis heeeeuuuuuuuuuuu il avait pas dit APRES la photo :!:

Merciiiiiiiii ca maaaarche ! :D

Posté : 08 mai 2006, 12:08
par Truc
Maiiiiiiiiiiiiiis heeeeuuuuuuuuuuu il avait pas dit APRES la photo :!:
logique quand tu nous tiens :lol: