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 ?
Simply run a while loop that will continue to loop (and increase the number) until the number is divisible by 6.
while ($number % 6 != 0) { $number++; }