note 21741 rejected from control-structures.break by vlad

From: Date: Thu, 26 Sep 2002 22:46:22 +0000
Subject: note 21741 rejected from control-structures.break by vlad
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-37309@lists.php.net to get a copy of this message
If you have several nested IF statements, you can break out of them using a little trick... if (condition 1) do { if (condition 2) break; } while (0) The break breaks out of the while loop, but since the loop only runs once it also breaks out of the "condition 1" if statement.

« previous php.notes (#37309) next »