Source Code:
(back to article)
<?php // Example 1 for ($i = 0; $i < 10; $i++) { if ($i == 5) { continue; } echo $i . PHP_EOL; } // Output: 0 1 2 3 4 6 7 8 9 // Example 2 $myArray = ["apple", "banana", "cherry", "date"]; foreach ($myArray as $value) { if ($value == "cherry") { continue; } echo $value . PHP_EOL; } // Output: apple banana date
Result:
Report an issue