$handle = opendir ('./pics');
        while (false !== ($file = readdir($handle))) {
            if($file != "." && $file != ".." && $file != basename(__FILE__)) {
                echo '<img src="pics/'.$file.'" width="50%" height="50%"/>';
As you see its a code to show the content of a web directory, and the link to that file,
i use it to show images on the page.
Now, i Need the limit of images per page was 10, and then it creates a new page...
Can you help me do that?