Re: How to break out of nested loops

From: Date: Mon, 17 Mar 2003 22:52:34 +0000
Subject: Re: How to break out of nested loops
References: 1 2  Groups: php.general 
Request: Send a blank email to php-general+get-140058@lists.php.net to get a copy of this message
Cheers matey!!!!! Nice to know people are alwyas around to help! ;o) "Erik Price" <eprice@ptc.com> wrote in message news:3E764F7E.7040607@ptc.com... > > > Bix wrote: > > I have a for loop within a for loop, and need to break out of both > > together... > > > > for ( blah ) { > > for ( blah ) { > > if ( true ) { break; } // only breaks out of this loop, how can I break it > > out of both loops. > > } > > } > > "break accepts an optional numeric argument which tells it how many > nested enclosing structures are to be broken out of." > > from http://www.php.net/manual/en/control-structures.break.php > > > Erik >

« previous php.general (#140058) next »