The foreach loop


SUBMITTED BY: henry1874w

DATE: June 12, 2017, 4:16 p.m.

FORMAT: Text only

SIZE: 180 Bytes

HITS: 392

  1. <!DOCTYPE html>
  2. <html>
  3. <body>
  4. <?php
  5. $colors = array("red", "green", "blue", "yellow");
  6. foreach ($colors as $value) {
  7. echo "$value <br>";
  8. }
  9. ?>
  10. </body>
  11. </html>

comments powered by Disqus