foreach.php

<!DOCTYPE html>
<html lang="en">
  <head>
    <title>foreach loop</title>
    <meta charset="utf-8">
  </head>
  <body>
  <ul>
    <?php
    $flowers = array( "Rose", "Carnation", "Lily", "Peony", "Violet" );
    $flowers[20] = "Daffodil";	// create a gap
    foreach( $flowers as $flower ) {
	print "<li>$flower</li>\n";
    }
    ?>
  </ul>
  </body>
</html>