HTML
CSS
PHP
Deno
Examples
Do It Yourself
Blog
Type in your code below
Run
<?php $array = ["a", "b", "c", "d"]; for($i = 0; $i <= count($array); $i++){ //break out of the loop when it gets //to the third element //array index always start at 0 if($i === 2) { break; } echo "$array[$i] <br>"; } ?>