This site is mobile accessible. Press the "Tap Here" button to use a different font-size.


Smartphone icons created by Freepik - Flaticon

PHP Loops

The PHP foreach Loop

red
green
blue
yellow

<?php  
// create $colors array
$colors = array("red", "green", "blue", "yellow"); 

// run foreach loop on the $colors array
foreach ($colors as $x) {

// displays the values of $x
  echo "$x <br>";
}
?>