$a = ['foo' => 1, 'bar' => 2]; # => 12 foreach ($a as $k) { echo $k; }
See: Array iteration
# => 1235 for ($i = 1; $i <= 5; $i++) { if ($i === 4) { continue; } echo $i; }
# => 123 for ($i = 1; $i <= 5; $i++) { if ($i === 4) { break; } echo $i; }
# => 12345 for ($i = 1; $i <= 5; $i++) { echo $i; }
$i = 1; # => 12345 do { echo $i++; } while ($i <= 5);
$i = 1; # => 12345 while ($i <= 5) { echo $i++; }