Contact: aviboots(AT)netvision.net.il
41,215 questions
53,717 answers
573 users
function roundToMultipleOf($number, $multipleOf) { return $multipleOf * round($number / $multipleOf); } echo roundToMultipleOf(9, 8) . "\n"; echo roundToMultipleOf(19, 8) . "\n"; echo roundToMultipleOf(71, 8) . "\n"; /* run: 8 16 72 */