note 23416 deleted from function.next by aidan

From: Date: Sat, 18 Sep 2004 04:31:41 +0000
Subject: note 23416 deleted from function.next by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-76908@lists.php.net to get a copy of this message
Note Submitter: ---- One example what you can do with next, current and reset functions: $colorList=array("#FFFFFF","#F1F2E6","#CCCCCC"); for(..) { .. $color = (next($colorList)) ? current($colorList) : reset($colorList); .. } I have seen many people doing this with function and static variable. I like to do it this way =)

« previous php.notes (#76908) next »