How to work out the remainder (modulus) of a division in PHP?
In programming, sometimes you need the remainder of a division sum to perform certain operations.
For example, when you divide 9 by 2, the remainder is 1

There are various mathematical reasons you might want to know the remainder, as well as performing some flow control logic such as looping. Another example is that in a grid when you want to know the x,y co-ordinates of a particular cell.