Ver Mensaje Individual
  #2 (permalink)  
Antiguo 11/11/2010, 08:24
Death_Empire
 
Fecha de Ingreso: febrero-2010
Mensajes: 818
Antigüedad: 14 años, 2 meses
Puntos: 55
Respuesta: dar estilo a 4 ultimos valores de combo

se me ocurre algo asi, no lo probe pero deberia funcionar
Código PHP:
echo "<select name='prod'>"
echo 
"<option value='' selected>--Selecciona un Evento--";   
$total mysql_num_rows($RESULTADO2);
$i 0;
while(
$FILA2=mysql_fetch_array($RESULTADO2)) 
    { 
       if((
$total 4) > $i) {
          echo 
"<option style='color:red;' value='"$FILA2['id'] ."'>"$FILA2['id'] ."-"$FILA2['titulo'];       
       }
       else{
          echo 
"<option value='"$FILA2['id'] ."'>"$FILA2['id'] ."-"$FILA2['titulo']; 
       }
        
      
$i++;
    } 
     
    echo 
"</select> "