Posts Tagged by is_int
PHP Tutorial: Spotting Even Numbers
| April 23, 2012 | Posted by Greg Bulmash under PHP |
I was in a programming interview and asked to solve some coding problems. I don't even remember the problem, but I remember a subtask: determine if a number was odd or even. My first thought was the modulus operator (%). 20 / 6 will return 3.333333. 20 % 6 will return 2. Modulus is likeā¦
Recent Comments