Re: [PHP-WIN] a for-loop syntax question

2004-01-12 Thread Svensson, B.A.T. (HKG)
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

Re: [PHP-WIN] a for-loop syntax question

2004-01-12 Thread Bobo Wieland
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

Re: [PHP-WIN] a for-loop syntax question

2004-01-12 Thread Svensson, B.A.T. (HKG)
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

Re: [PHP-WIN] a for-loop syntax question

2004-01-12 Thread Bobo Wieland
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 =

Re: [PHP-WIN] a for-loop syntax question

2004-01-12 Thread Svensson, B.A.T. (HKG)
> 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

Re: [PHP-WIN] a for-loop syntax question

2004-01-12 Thread Svensson, B.A.T. (HKG)
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++) {}

Re: [PHP-WIN] a for-loop syntax question

2004-01-12 Thread Svensson, B.A.T. (HKG)
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

[PHP-WIN] a for-loop syntax question

2004-01-12 Thread Bobo Wieland
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