CodeIgniter’s alternator() Function
It’s surprising to me how often I find little functions for tedious tasks, that CodeIgniter already has built in. One of these functions is the alternator() function in the String Helper. What the alternator() function does is allow two or more items to be alternated between when iterating through a loop.

