note 12178 deleted from control-structures.for by danbrown
| From: | danbrown@php.net | Date: | Mon, 07 Dec 2009 16:10:29 +0000 |
| Subject: | note 12178 deleted from control-structures.for by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-163666@lists.php.net to get a copy of this message | ||
Note Submitter: harbater at teamgenesis dot com
----
If you want two conditions to be evaluated in expr2, you can't just separate them with commas
like you can with expr1 and expr3.
For example, this does not work:
for ($i=$start, $count=0; $i<$total, $count<10; $i+=10, $count++)
But this does:
for ($i=$start, $count=0; ($i<$total && $count<10); $i+=10, $count++)