Je veut dire lorsque l'on affiche les données dans un tableau j'aimerais que la première ligne soit d'une couleur de fond différente à la deuxième.
Voici mon script :
<?php
$select = "SELECT secteur_activite, fonction, societe, DATE_FORMAT(date, '%d.%m.%y') date, profil_rechercher FROM fk_offre_emploi where secteur_activite LIKE '$secteur_activite%'";
$result = mysql_query($select) or die ('Erreur : '.mysql_error() );
$total = mysql_num_rows($result);
if($total) {
// debut du tableau
echo '<table width="750" align="center" border="0" cellpadding="3" cellspacing="1" summary="" bgcolor="#FFFFFF">'."\n";
echo '<tr height="5">';
echo '<td bgcolor="#05A9CC" width="400" height="5"><b>Poste/Fonction</b></td>';
echo '<td bgcolor="#69BFCC" height="5" align="center"><b>Société</b></td>';
echo '<td bgcolor="#81CCCC" height="5" align="center"><b>Paru le</b></td>';
echo '</tr>'."\n";
while($row = mysql_fetch_array($result)) {
echo '<tr>';
echo '<td bgcolor="#CCCCCC" width="400"><b>'.$row["fonction"].' </a></b><br>
'.$row["profil_rechercher"].'</td>';
echo '<td bgcolor="#CCCCCC" align="center" valign="top">'.$row["societe"].'</td>';
echo '<td bgcolor="#CCCCCC" align="center" valign="top">'.$row["date"].'</td>';
echo '</tr>'."\n";
}
echo '</table>'."\n";
// fin du tableau.
Merci pour votre aide