Foreach

$a = array(
     "color" => "red",
     "taste" => "sweet",
     "shape" => "round",
     "name"  => "apple",
     3       => 4
);

foreach ($a as $value) {
  echo "Value: $value";
}
foreach ($a as $key => $value) {
  echo "Key: $key; Value: $value";
}

"red", "taste" => "sweet", "shape" => "round", "name" => "apple", 3 => 4 ); foreach ($a as $value) { echo "Value: $value
\n"; } foreach ($a as $key => $value) { echo "Key: $key; Value: $value
\n"; } ?>