【发布时间】:2016-04-10 09:21:21
【问题描述】:
所以我有这个代码:
if (isset($_GET['code'])) {
$code = $_GET['code'];
if (!array_key_exists($code, $errors)) {
break 2; // Move to else to do other stuff
}
// Do stuff
} else {
// Do other stuff
}
但我不能让休息时间去做我想让它做的事情? 我只是得到一个错误:
致命错误:无法在第 161 行的 {filepath}\index.php 中中断/继续 2 个级别 // !array_key_exists 行
那么我怎样才能让 if 中断并转移到 else 上呢?
【问题讨论】:
标签: php if-statement