你实际上不能,你可以做一个肮脏的把戏
for ($i=0; $i<99; $i++){
if(someCondition) {
$i = $i + N; // This will sum N+1 because of the $i++ in the for iterator (that fire when the new loop starts)
continue;
}
}
Run Code Online (Sandbox Code Playgroud)