php foreach upto 5 index code example Example: php foreach index foreach($array as $key=>$value) { // do stuff }