Ver Mensaje Individual
  #2 (permalink)  
Antiguo 24/02/2009, 17:40
Avatar de Triby
Triby
Mod on free time
 
Fecha de Ingreso: agosto-2008
Ubicación: $MX->Gto['León'];
Mensajes: 10.106
Antigüedad: 15 años, 8 meses
Puntos: 2237
Respuesta: de .net a php

intval(floor(($rating - 1) / 4) + 1);

Edito, porque floor ya devuelve un entero y no es necesario convertir tipos:

floor(($rating - 1) / 4) + 1;
__________________
- León, Guanajuato
- GV-Foto