Tableau PHP
Posté : 07 mai 2006, 16:44
Bonjour,
J'ai fais ceci :
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