foreach($array as $key=>$value) {
// do your own stuff
}
or
foreach ($array as $key => $value) {
// do something with $key and $value
}
or
foreach ($array as &$value) {
// do something with $value
}
Note: There are three ways to approach.