1. Home
  2. Php
  3. Foreach

Loop through an array.

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

foreach( $colours_arr as $colour){
    echo $colour;
}
copy
Full Php cheatsheet
NordVPN NordVPN