f you use this in loops or large quantities, you might want to consider the bitcheck suggested by Arius2038, which is very fast. The bitcheck is my prefered method for odd/even checks. – Martijn Jul 3 '13 at 9:48
-
Works fine but I'm just wondering whats the logic behind this? Why is it that a value of true is given if "10 == 0" ? – snlan Sep 24 '14 at 11:42
-
1
@Tim, if 5%2=1. The logica is 2*2+1=5.How to get the 2 in php? – Hendry Tanaka Oct 23 '14 at 2:22
-
1
@Hendry - what are you asking exactly? How to get the quotient for a d