$dir_names = array(
'dir1',
'dir2',
'dir3',
// ...
);
$array_name = array();
foreach($dir_names AS $dir_name)
$array_name[$dir_name] = array();
I think at least thats what you are talking about. Then you could do something like
$array_name['dir1'][] = 'ober.xxx';
Or whatever to load the actual files into that directory. If you then wanted to output all the files:
foreach($array_name AS $dir => $files)
foreach($files AS $file)
echo $dir, '/', $file;