FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » terminate a PHP script
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: terminate a PHP script [message #172580 is a reply to message #172559] Tue, 22 February 2011 01:24 Go to previous messageGo to previous message
The Natural Philosoph is currently offline  The Natural Philosoph
Messages: 993
Registered: September 2010
Karma:
Senior Member
sheldonlg wrote:
> On 2/21/2011 1:54 PM, n00m wrote:
>>
>>> Again, why not if-then-else?
>>
>> what if it's 10 nested for() stmts?
>> And you need to break out of ALL for()'s from the innermost for()?
>> Do you like 10 if-then-else conditionals, 1 per each for()?
>
> && !$exit_all
>
> in each of the test conditions of the for loop where $exit_all is
> initially FALSE outside the outermost loop.
>
> for ($i1=0, $exit_all=FALSE; $i1 < $i1_end && !$exit_all; $i1++) {
> for ($i2=0, $exit_all=FALSE; $i2 < $i2_end && !$exit_allt; $i2++) {
> ..... // and so on
> if ($some_condition == TRUE) {
> $exit_all = TRUE;
> break; // or continue which does one extra check step
> }
> }
> }
>
>
>
I didn't understand a word of that. ;-)

AND you used a BREAK. hanging is too good...
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Extralight browser-webserver communication via cookies (+)
Next Topic: Storing multiple character set types (or a representation of em) in a table column
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Tue Nov 26 23:32:38 GMT 2024

Total time taken to generate the page: 0.04153 seconds