Nesta aula estudaremos a instrução continue e a sua utilização dentro das estruturas de repetição. Também estudaremos a diferença entre a instrução break e a instrução continue. |
EXEMPLO FEITO EM AULA
//INSTRUÇÃO CONTINUE
//NÚMEROS PARES DE 0 ATÉ 100
for($i=0; $i<100; $i++){
if($i % 2 == 1){
continue;
}
echo $i . "\n";
}
Tags curso, php
Comentários
comments powered by Disqus