Php Array (few) foreach get values
===

Doing simple ftp viewer in php:

i've got a function that returns arrays with file_name.


I do (in the end of my function) `print_r($files);` and this is out put
    

    Array ( [0] => task_manager.zip [1] => 1086237 [2] => zip ) Array ( [0] => asd.zip [1] => 1086237 [2] => zip [3] => fonts/some_file.zip [4] => 959224 [5] => zip )

As you can see i get arrays, and this is perfect but then i want to get file_name, file_size & file_extension and I get fail:

p.s - `ListFiles` - is my function name, `('fonts/')` - folder where i find files

    foreach (ListFiles('fonts/') as $key=>$file){
        echo 'file_name = '.$file."<br/>";
    }

and I get:

    file_name = task_manager.zip
    file_name = 1086237
    file_name = zip
    file_name = fonts/some_file.zip
    file_name = 959224
    file_name = zip

which actually is wrong, because i want do it in one line, something like this:

WHAT I WANT (NEAR THE PERFECT WAY) TO DO SOMETHING LIKE THIS:

in php:

    foreach (ListFiles('fonts/') as $key=>$file){
        echo 'file_name = '.$file[0].'file_size = '.$file[1].'file_ext = '.$file[2].'<br/>';
    }


in html:

    file_name = task_manager.zip, file_size = 1086237, file_ext = zip
    file_name = some_file.zip, file_size = 959224, file_ext = zip