<?php
echo"\n";
echo"\n";
for ( $i = 0; $i < 5; $i++ ) {
switch ($i)
{
case 0:
echo $i . "b";
continue;
echo $i . "a";
case 1:
echo $i . "b";
continue 2;
echo $i . "a";
case 2:
echo $i . "b";
break;
echo $i . "a";
case 3:
echo $i . "b";
break 2;
echo $i . "a";
case 4:
echo $i;
}
echo 9;
}
echo"\n";
echo"\n";
?>
This results in: 0b91b2b93b
It goes to show that in a switch statement break and continue are the same. But in loops break stops the loop completely and continue just stops executing the current iterations code and moves onto the next loop iteration.