foreach($array as $i => $item) { echo $item[$i]['filename']; echo $item[$i]['filepath']; // $array[$i] is same as $item }