On Tue, 30 Jun 2009 18:31:54 -0500, Flint Million wrote:

> Suppose I have some kind of check variable - say for example
> $abort_now. Or it could be a function. Something to be evaluated to a
> value.
> 
> I want to execute a block of statements, but after EACH statement
> executes, check the value of $abort_now and if it is true, break; out
> of the block.
> 
> Here's an example
> 
> do {
>   do_something();
>   do_something_else();
>   do_another_thing();
>   do_yet_another_thing();
>   and_keep_doing_things();
> } while ($abort_now != 1);

I would have the functions return true or false and
do something like:

  while (do_something()         &&
         do_something_else()    &&
         do_another_thing()     &&
         do_yet_another_thing() &&
         and_keep_doing_things())
    ;


/Nisse

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to