Posted by jerryyang_la1 on 09/13/06 08:59
Noodle wrote:
> jerryyang_la1@yahoo.com wrote:
> > I'm looing for a simple PHP file list program, that will show all the
> > files in a folder, but show them in batchs of 10 - 15..
> >
> > Any ideas??
> >
> > Many Thanks
>
> This is a little crude but it should get the job done.
>
> <?php
> if ($handle = opendir('.')) {
> $count = 0;
> while (false !== ($file = readdir($handle))) {
> echo $count == 0 ? "<ol>" : "";
> echo "<li>$file</li>";
> $count++;
> if($count == 10){
> echo "</ol>";
> $count = 0;
> }
> }
> echo $count != 10 ? "</ol>" : "";
> closedir($handle);
> } ?>
Hi
Thanks for that..It works, but I didn't describe it properly...
What I should have said that I would like it to use pagination, showing
10 entried per page, then allowing the user to move back or forward
through the pages !
Cheers
[Back to original message]
|