note 26318 rejected from control-structures.break by betz
| From: | betz@php.net | Date: | Sat, 26 Oct 2002 13:20:49 +0000 |
| Subject: | note 26318 rejected from control-structures.break by betz | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-38585@lists.php.net to get a copy of this message | ||
Strange...cant get this to work...
if(@$somevar){
foreach ($a as $b){
if($b=="foo"){
do something;
break 2;
}
if($b=="bar"){
do something else;
}else{
foobar();
}
}
$foo=$bar;
}
Dont mind the vars, they mean nothing and for example...In my real code, "break 2" gives
back an error (Fatal error: Cannot break/continue 2 levels), but if I use only "break" or
"break 1", then the $foo=$bar line gets done, and I dont want that! What am I doing wrong?