<?php $tests = [ 2, 5, 7, 11, 12 ]; $x = 5; $y = 10; foreach($tests as $a){ $quo = intval($a / $x); if($quo * $x < $a) $quo++; echo $a," => " ,$quo * $y,PHP_EOL; }
You have javascript disabled. You will not be able to edit any code.