Sunday, February 17, 2013

Even or odd number validation with PHP

The other day, while I was writing up some PHP code, I ran into a really cool way of identifying if a number is even or odd (refer to the link further down below). I needed it as I looped the creation of a couple of divs and wanted the odd numbered ones to be floated left, the evens to the right. So I found the following article, a very simple solution: Check if a Number is Even or Odd with PHP

No comments:

Post a Comment

Dear legitimate commenters, please post your comments below. I'd be happy to receive your feedback; helps me a lot improving, or getting reassurance that I'm doing something really great here.

IMPORTANT! A note to commenters planning on advertising their business in comments: please be informed that I'm NOT going to post your comments but will ALWAYS mark them as SPAM.