Source Code:
(back to article)
<?php // Example 1 for ($i = 0; $i < 10; $i++) { echo $i . PHP_EOL; } // Output: 0123456789 // Example 2 $colors = ["red", "green", "blue"]; for ($i = 0; $i < count($colors); $i++) { echo $colors[$i] . '-'; } // Output: red-green-blue-
Result:
Report an issue