php foreach arrat code example Example: php foreach $arr = ['Item 1', 'Item 2', 'Item 3']; foreach ($arr as $item) { var_dump($item); }