On Mon, 2004-01-12 at 16:12, Bobo Wieland wrote:
> worked like a charm! =)
>
> don't think it'll tell you much, but this is the actual code i'm using now:
>
> for ($j = 1; $j < 10 && $num_rows > 0; $num_rows -= MAXSHOWN, $j++) {}
The syntax is quite clear to me, but what about this break condit
AIL PROTECTED]>
To: "Bobo Wieland" <[EMAIL PROTECTED]>
Cc: <[EMAIL PROTECTED]>
Sent: Monday, January 12, 2004 4:08 PM
Subject: Re: [PHP-WIN] a for-loop syntax question
> In C/C++ you can so I just assumed it would also be possible in php .
>
> Try on your own
In C/C++ you can so I just assumed it would also be possible in php .
Try on your own risk. :)
On Mon, 2004-01-12 at 15:26, Bobo Wieland wrote:
> thank you!
>
> You learn something new everyday... Didn't think you could use expressions
> like that in a for-loop...
>
--
PHP Windows Mailing Lis
OTECTED]>
Sent: Monday, January 12, 2004 3:16 PM
Subject: Re: [PHP-WIN] a for-loop syntax question
>
> > ERRATA:
> >
> > for ($i = 0, $j = 0; (!($j = 5) && $i < 10 && $j < 5); $i++, $j++)
>
> ERRATA 2:
>
> for ($i = 0, $j = 0; (!($j =
> ERRATA:
>
> for ($i = 0, $j = 0; (!($j = 5) && $i < 10 && $j < 5); $i++, $j++)
ERRATA 2:
for ($i = 0, $j = 0; (!($j == 5) && ...
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
On Mon, 2004-01-12 at 15:11, Svensson, B.A.T. (HKG) wrote:
> On Mon, 2004-01-12 at 15:07, Bobo Wieland wrote:
> > 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++) {}
On Mon, 2004-01-12 at 15:07, Bobo Wieland wrote:
> 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 t