I hope that the following code is along the right lines.
Basically it reads the directory and places the file names into an array. Then you select a start point (you could do this in the URL) and prints out the names of 12 files. You could read the files themselves instead of simply printing out the names.
To view the next 12. Add a link: page.php?start=$start+12
<?php
$dir_to_open = opendir ("your_dir");
$n = 0;
while ($files = readdir ($dir_to_open)) {
$file_array[$n] = "$files";
$n++;
}
closedir ($dir_to_open);
$number_files = count($file_array);
$start = 0;
$end = $start+11;
if ($end >= $number_files) {
$end = $number_files-1;
}
for ($n=$start; $n<=($end); $n++) {
print "$n: $file_array[$n]<br>";
}
?>
Hope it helps?
Terry