Robert Cummings wrote:
> 
> The more generic approach:
> 
> function getNextColour( &$lastIndex, $colourList )
> {
>     return $colourList[(++$lastIndex % count( $colourList ))];

Ummmm... $lastIndex++, don't want to start on the second entry :)

Cheers,
Rob.
-- 
.-----------------.
| Robert Cummings |
:-----------------`----------------------------.
| Webdeployer - Chief PHP and Java Programmer  |
:----------------------------------------------:
| Mail  : mailto:[EMAIL PROTECTED] |
| Phone : (613) 731-4046 x.109                 |
:----------------------------------------------:
| Website : http://www.webmotion.com           |
| Fax     : (613) 260-9545                     |
`----------------------------------------------'

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to