loop through array of arrays php code example
Example 1: how to iterate through php array
$ar = ['Rudi', 'Morie', 'Halo', 'Miki'];
for ($i=0, $len=count($ar); $i<$len; $i++) {
echo "$ar[$i] \n";
}
/*
Rudi
Morie
Halo
Miki
*/
Example 2: php loop through array
foreach($array as $item=>$values){
echo $values->filepath;
}