in_array foreach php code example
Example 1: php foreach array
$arr = array(1, 2, 3);
foreach ($arr as $key => $value) {
echo "{$key} => {$value} ";
}
Example 2: php foreach string in array
foreach($array as $item) {
echo $item['filename'];
echo $item['filepath'];
// to know what's in $item
echo '<pre>'; var_dump($item);
}