note 20092 deleted from function.next by aidan

From: Date: Sat, 18 Sep 2004 04:32:00 +0000
Subject: note 20092 deleted from function.next by aidan
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-76910@lists.php.net to get a copy of this message
Note Submitter: silkskippy at yahoo dot com ---- I suppose you could use a for loop if you're more comfortable with them: $foo = range(0,20); for($i = reset($foo); !is_bool($i); $i = next($foo)){ echo "$i\n"; } Note: If it's possible that zero exists in your array, then you should use the is_bool() check for the conditional statement. I noticed that the for loop will break on (actual) values of zero.

« previous php.notes (#76910) next »