a for-loop syntax question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [PHP Home]     [PHP Users]     [PHP Database Programming]     [PHP Install]     [Kernel Newbies]     [Yosemite Forum]     [PHP Books]

  Powered by Linux