1. Home
  2. Php
  3. Foreach
#php#loop

Loop through an array.

$colours_arr = array('orange','blue','purple');

foreach( $colours_arr as $colour){
    echo $colour;
}
copy
Full Php cheatsheet
Sitemap Git repository