Results 1 to 3 of 3

Thread: How would i

  1. #1
    Join Date
    Oct 2005
    Location
    Spain, Valencia
    Posts
    20,492
    Tokens
    3,580
    Habbo
    GoldenMerc

    Latest Awards:

    Default How would i

    Make a page that puts image tags around everything in one folder?

    E.g if i had all my images at /images/ross and i want every single image to appear on the site so i can just scroll through and choose what i want how would i do this?
    Ross

  2. #2
    Join Date
    Jan 2006
    Location
    Kent
    Posts
    987
    Tokens
    0

    Default

    PHP Code:
    $folder = new RecursiveDirectoryIterator('path/to/folder');
    foreach (new 
    RecursiveIteratorIterator($folder) as $filename => $file) {
        echo 
    "<img src=\"{$filename}\" /><br/>";

    should do it
    This is our situation and we're happy to be here,
    I wouldn't change this place for anything.


  3. #3
    Join Date
    Oct 2005
    Location
    Spain, Valencia
    Posts
    20,492
    Tokens
    3,580
    Habbo
    GoldenMerc

    Latest Awards:

    Default

    put it as a .php page or what?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •