OddEven Class
Allows you to easily keep track of a series of items as either odd or even. Each time you check (using the "which" method) the counter increments so that the next time you check the state will have changed. This is the perfect class for using when you're outputting an HTML table and want to use different classes to differentiate between odd and even rows. Simply create a new instance and call OddEven->which() for each row!This entry was posted
on Tuesday, March 9th, 2010 at 2:31 pm
Entry is filed under Snippets.
Read original posting here.
You can follow any responses to this entry through the RSS 2.0 feed.
You can skip to the end and leave a response. Pinging is currently not allowed.