Ver Mensaje Individual
  #6 (permalink)  
Antiguo 05/09/2012, 12:05
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

y 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)) { 
        echo 
"<tr><td>*%s</td> <td>*%s*</td></tr> ";
        
$i++;
        if(
$i%2==0){ 
            echo 
"<tr bgcolor='#555'>";//esto podrías hacerlo con un estilo ya que con estilos es mejor.
        
}else{
             echo 
"<tr bgcolor='#333'>";
       }
       echo 
"<td>".$row['nombre']."</td><td> "$row['motivo']."</td>"
       echo 
"</tr>";
    } 
    
mysql_free_result($result); 
    
mysql_close($link);     
?> 
</table>

Última edición por Gerwal; 05/09/2012 a las 12:10