Ver Mensaje Individual
  #1 (permalink)  
Antiguo 05/06/2009, 00:50
bellleti
 
Fecha de Ingreso: abril-2008
Mensajes: 144
Antigüedad: 16 años
Puntos: 1
Pregunta poner color a tabla segun resultados

buenas como puedo poner color a las filas, en distintos colores blanco, gris, blanco gris...etc ( para que se lea bien). utilitzo smarty tambien, no se si se puede usar tambien para esto...

mi tabla

Código PHP:


     
<table width="200" border="1">
    <
tr>    
        <
th scope="col">Vaca/Codi</a></th>  <!--    com sordena¿?   -->
        <
th scope="col">Estat</th>
        <
th scope="col">Data ultim part</th>
        <
th scope="col">Dt.insem</th>
        <
th scope="col">Dies Insem.</th>
        <
th scope="col">Últim Control</th>
            
    </
tr>    
        {
section name=sect2 loop=$resultatsgesteix}
        
       <
tr BGCOLOR="#778899">
           <
th scope="row"><a href="infovaca.php?codi={$resultatsgesteix[sect2].vaca}">{$resultatsgesteix[sect2].vaca}</th>
        <
td> {if $$resultatsgesteix[sect2].estat  eq "L"Buida Lactant{/if}
        {if 
$resultatsgesteix[sect2].estat eq "P"Gestant Lactant{/if}
        {if 
$resultatsgesteix[sect2].estat eq "D"Gestant Eixuta{/if}
        {if 
$resultatsgesteix[sect2].estat eq "S"Inseminada o Buida {/if}
        </
td>
        <
td>{$resultatsgesteix[sect2].datapart}</td>
        <
td>{$resultatsgesteix[sect2].datainsem}</td>
        <
td>{$resultatsgesteix[sect2].diesinseminat}</td>
        <
td>{$resultatsgesteix[sect2].ultimcontrol}</td>
      </
tr
y quiero que un resultado pinte blanco i el otro gris:
<tr BGCOLOR="#778899">

gracias :)