#1
  1. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    17
    Rep Power
    0
    Say i have a directory with loads of images, with no particular names, and i want to have php scan the directory for thumbnails (blah_small.gif), and then put, say 40 on one page, 40 on the next etc. They would probably be in alphabetical order. I could pass a variable "from" to the page to determine the start image.

    How would i do this? I need to get php to scan the image directory and possibly load all the filenames into an array or something.

    Thanks for any help in advance.
  2. #2
  3. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    24
    Rep Power
    0
    i was bored, so i made something simular for PHP4. it's at http://www.weeder.f2s.com/thumb.php.txt if you want to use it, or, if you use PHP3, get ideas from.

    ------------------

    - weeder
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    45
    Rep Power
    14
    To pass variables from one page to the next just do...
    www.domain.com/page.html?offset=40

    Then you can increment the offset every page. If you plan on using strings, you might want to see urlencode and urldecode too.
  6. #4
  7. No Profile Picture
    Junior Member
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Posts
    17
    Rep Power
    0
    Thanks both for you help, i've got it working thanks to weeder's directory example.

Similar Threads

  1. Replies: 2
    Last Post: August 18th, 2004, 10:45 PM
  2. Replies: 1
    Last Post: February 4th, 2004, 01:39 PM
  3. PHP with UnixODBC
    By coder4hire in forum PHP Development
    Replies: 2
    Last Post: January 20th, 2004, 01:14 PM
  4. Passing string from PHP to Javascript
    By ka8oad in forum JavaScript Development
    Replies: 4
    Last Post: January 17th, 2004, 03:12 PM
  5. UnixODBC + PHP + Apache + Empress
    By coder4hire in forum Database Management
    Replies: 0
    Last Post: January 15th, 2004, 01:41 PM

IMN logo majestic logo threadwatch logo seochat tools logo