Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<?php
$cars = ["Ford", "Volvo", "BMW"];
foreach($cars as $car) {
  echo $car;
  echo "<br>";
  if($car == "Volvo") {
    break;
  }
}
?>
</body>
<!-- Mirrored from www.w3schools.com/php/phptryit.asp?filename=tryphp_keyword_break by HTTrack Website Copier/3.x [XR&CO'2014], Mon, 05 Sep 2022 15:02:05 GMT -->
</html>
Ford
Volvo