Ver Mensaje Individual
  #3 (permalink)  
Antiguo 09/08/2006, 22:13
erwinrp
 
Fecha de Ingreso: octubre-2004
Mensajes: 251
Antigüedad: 19 años, 6 meses
Puntos: 1
Cita:
Iniciado por DarkXNightmare Ver Mensaje
Toma... te dejo un regalito que hice hace 1min ;D...
Código PHP:
function round_at_five($num)
{
    
$num round($num);
    
$num round($num 5);
    
$num $num 5;
    return 
$num;
}
echo 
round_at_five(232.1); // devuelve 230
echo round_at_five(233); // devuelve 235
echo round_at_five(231); // devuelve 230
echo round_at_five(230.90); // devuelve 230
echo round_at_five(234.1); // devuelve 235 
Luego me cuentas si te sirve ;D.
Atte... DarkXNightmare ;D.
excelente muchisimas gracias