+ 2
Can somebody explain me this code?
<?php $i=1; While($i<3){ Echo $i%2; $i++; } ?> The result is 10 but i have no idea why.. Thanks
2 Answers
+ 5
i is 1
1 % 2 == 1
i is 2
2 % 2 == 0
i is 3
the loop stops
so, 10 is printed
+ 2
thank you for that..it was that easy..i am embarrassed now..