avatar
Iterate over arrays in PHP with foreach loop PHP
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.

24
You need to login to do this manipulation!