boucle for php with data

PHP
foreach($array as $item=>$values){
     echo $values->filepath;
    }foreach($array as $item) {
    echo $item['filename'];
    echo $item['filepath'];

    // to know what's in $item
    echo '<pre>'; var_dump($item);
}
Source

Also in PHP: