我将尝试用注释代码解释我想实现的内容。如果条件符合,则跳过if语句并继续执行下面的代码php
我想要做的是跳过if语句,如果条件满足并继续执行条件语句之外的代码。
<?php
if (i>4) {
//if this condition met skip other if statements and move on
}
if (i>7) {
//skip this
?>
<?php
move here and execute the code
?>
我知道break,continue,end和return语句,但这不适用于我的情况。
我希望这可以清除我的问题。
中断并继续工作只在循环内。 –
你可以简单地包装什么应该跳过一个else语句?这是我认为如果 - 其他 - 是有原因的。正如有人早些时候所说的那样:if(i> 4)和if(i> 7)如何相关。如果他们应该使用if(i> 7)应该是第一个检查条件。 – Alex