Copy link to clipboard
Copied
Hi, can someone please explain to me (a person with no mathematical background) the modulo operator. I need to understand it, because I'm learning
PHP at the moment.
Thanks!!!
Copy link to clipboard
Copied
It's the remainder of an integer division operation. For example, consider 6/4 (six divided by four):
For floating point math, the answer is: 1.5
But, for integer math, the fraction is thrown away and the answer is: 1. There's no way to know if there's a remainder for the division operation, so the modulo operation is provided to get the remainder, which is 2.
HTH,
Randy
Copy link to clipboard
Copied
BITESGIRL wrote:
Hi, can someone please explain to me (a person with no mathematical background) the modulo operator.
Please do not post the same question in multiple forums. You also posted this question as a private message to me. Doing so wastes the valuable time of everyone who responds, and is likely to result in your future questions being ignored.
Find more inspiration, events, and resources on the new Adobe Community
Explore Now