I need a little help writing a math formula in php.
I want to find the difference between the current number and the next number that will divide evenly into X.
For example:
I have 7 rows of data in my table.
If I divide 7 by 3, I have a remainder.
The next number that can be divided by 3 with no remainder is 9.
I'd like to return 2.
Help?