Ver Mensaje Individual
  #3 (permalink)  
Antiguo 19/12/2007, 14:22
Avatar de ginitofl
ginitofl
 
Fecha de Ingreso: diciembre-2006
Ubicación: Lima Perú
Mensajes: 349
Antigüedad: 17 años, 4 meses
Puntos: 22
Re: Ultimos registros en tabla

puedes hacerlo asi:

Código PHP:
$r=1;

do{ 

if(
$r%2==0)
 {
        echo 
"<table cellpadding='3' cellspacing='0' border='0' width='100%'>"

         echo 
"<tr bgcolor='#CCCC66'>"
                         echo    
"<td width='50' height='20'><img src='/mf_temp/images/unread_icon.gif' alt='' /></td>"
                         echo    
"<td width='408'>Ultimos diez usuarios: ".$row_sql['nick']." </td>"
                     echo    
"</tr>"
                     echo    
"</table>"
}
else
{


                     echo 
"<table cellpadding='3' cellspacing='0' border='0' width='100%'>"

         echo 
"<tr bgcolor='#FFFFFF'>"
                         echo    
"<td width='50' height='20'><img src='icon.gif' alt='' /></td>"
                         echo    
"<td width='408'>Ultimos diez usuarios: ".$row_sql['nick']." </td>"
                     echo    
"</tr>"
                      echo    
"</table>";         
}

++
$r;
    }while(
$row_sql mysql_fetch_assoc($mostrar_sql)); 

Saludos.

Última edición por ginitofl; 19/12/2007 a las 14:27 Razón: me olvide aumentar el r