php - rounding integers of multiple of 50 -


will use 50 if have 99 points.
use full 100 - if have 100 points.
use 150 - if have 151 points.

i.e: allow 50, 100 ,150, 200, 250 depends on points.

i'd divide number 50, floor it, , multiply 50. e.g.:

$num = 99; $rounded = 50 * floor($num / 50); 

Comments