Ver Mensaje Individual
  #4 (permalink)  
Antiguo 05/09/2012, 11:45
Gerwal
 
Fecha de Ingreso: agosto-2012
Ubicación: Lima
Mensajes: 25
Antigüedad: 11 años, 8 meses
Puntos: 6
Respuesta: Crear tablas con diferentes colores

prueba este xD

Código PHP:
<TABLE width="747" BORDER=1 CELLPADDING=1 CELLSPACING=1> 
        <TR><TD width="144">*<B>Nombre</B></TD> <TD width="590">*<B>Motivo</B>*</TD></TR> 
<?php         
    $i
=0;
    while(
$row mysql_fetch_array($result)) { 
        
printf("<tr><td>*%s</td> <td>*%s*</td></tr> ");
        
$i++;
        if(
$i%2==0){ 
             
printf("<tr bgcolor='#555'>");//esto podrías hacerlo con un estilo ya que con estilos es mejor.
        
}else{
             
printf("<tr bgcolor='#333'>");
       }
       
printf ($row["nombre"], $row["motivo"]); 
       
printf("</tr>");
    } 
    
mysql_free_result($result); 
    
mysql_close($link);     
?> 
</table>