AlternarColor array iterator 1.0

AlternarColor array iterator is a very simple class that iterates over a set (of color codes or names maybe?) and returns the next element in the set on each iteration, coming to first element again. It can be useful for generating listings with rows using alternated colors.

AlternarColor array iterator can take an array with an arbitrary number of colors names or values. In the first iteration it returns the first color in the array. In the next iteration it returns the following color, and so on. When the end or the array is reached, it returns the first color again.

Limitations:
The comments in the class are in Spanish.

Atributes:
- colores // Available Colors
- color // Actual color

Methods:
- alternarColor( array("color1",...,"colorN") ) // Constructor
- imprimir () // Prints out value

License type: GPL - GNU Public License
Date added: 9 years, 16 days ago | Last updated: 9 years, 16 days ago

More popular Graph & Chart

This is actually one of the most advanced image hosting script. The imagetize key features: SEO, Ads Ready, Admin

Listing Files

alternarcolor-array-iterator
Hot Scripts
Sponsors