Archive for January, 2013



The Modulus operator, The Ternary operator and FizzBuzz in PHP

Sunday, January 6th, 2013

Happy new year! I’ve disabled my Facebook so I think I will start writing here more often..

Anyway, I wanted to talk about the Modulus operator % in PHP (which is very similar to most other programming languages).

From the PHP docs, we know that it returns the “Remainder of $a divided by $b“. But what does that mean?