I want to check if a number is divisible by 6 and if not I need to increase it until it becomes divisible.
how can I do that ?
Why don't you use the Modulus Operator?
Try this:
while ($s % 6 != 0) $s++;
Or is this what you meant?
$s= ; $k= $s % 6; if($k !=0) $s=$s+6-$k; ?>