a for-loop syntax question
| From: | Bobo Wieland | Date: | Mon, 12 Jan 2004 14:07:18 +0000 |
| Subject: | a for-loop syntax question | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-22556@lists.php.net to get a copy of this message | ||
Hi...
Is there a way to set a for loop to exit when the FIRST of many expresions evaluate to false?
the code: for ($i = 0, $j = 0; $i < 10, $j < 5; $i++, $j++) {} will execute 10 times, but i
was hoping it would exit when $j was set to 5... Is there some way of doing this?
.bobo