default argument value for break
-
19-06-2021 - |
Вопрос
Can anybody tell whats the default argument value for break
in control structures instead of break 1 , break 2 ,..
Example :-
for($i=0;$i<10;$i++){
for($j=0;$j<$i;$j++){
if($j == 4){
break;
}else{
echo $i+$j."<p>";
}
}
}
In the above example i used break
without arguments.Then which value it will take for that..?
Решение
The default argument value for break
is 1
(ie. innermost control structure). See also: http://php.net/manual/en/control-structures.break.php
Не связан с StackOverflow