foreach()

$name_array = array("John", "Jane", "Jason", "Janine"); foreach ($name_array as $name) { echo("$name <br>"); }

foreach() - key/value

$name_array = array("John" => "30", "Jane" => "35", "Jason" => "40"); foreach ($name_array as $key => $value) { echo("$key : $value <br>"); }