need help in script...

Discussion in 'PHP' started by Vladi, Mar 5, 2010.

  1. Vladi

    Vladi New Member

    Joined:
    Mar 5, 2010
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    0
    Code:
    <?php
            $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?
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice