#1
  1. No Profile Picture
    ...try and try again
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Lake Forest, CA, USA
    Posts
    182
    Rep Power
    15
    Hi all,

    I have a directory which contains files and I have since found out that I can place the files into an array. However, I am new to all of this and my all attempts at writing correct code have failed.

    All I want to do is place the file name into the array so that I can create a while loop on the array in a table. I would even be satisified with counting the number of files in the directory.

    Any suggestions?

    Thanks

    Sharky
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2000
    Posts
    300
    Rep Power
    15
    You could issue a system command that would list all of the directories, but that would not be the real solution. Check out the PHP manual under "Directory functions". You will have everything you need there. Also, there was a thread here at the forums about a similar thing, so yu could try searching for it (a guy usernamed alexgd wanted to know how to list all of the .txt, .html and .htm and .php3 files in a directory).

    HTH
  4. #3
  5. No Profile Picture
    ...try and try again
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jul 2000
    Location
    Lake Forest, CA, USA
    Posts
    182
    Rep Power
    15
    Thanks Dwarf, I think that will work for me.

    Sharky

Similar Threads

  1. Reading an entire file into a char
    By shadovv in forum C Programming
    Replies: 2
    Last Post: February 16th, 2004, 09:24 PM
  2. reading text file
    By jrthor2 in forum Java Help
    Replies: 4
    Last Post: February 14th, 2004, 12:42 PM
  3. reading in a file
    By Gustavo in forum C Programming
    Replies: 1
    Last Post: February 4th, 2004, 08:58 PM
  4. C++ reading file question
    By tmike in forum C Programming
    Replies: 1
    Last Post: February 3rd, 2004, 03:06 AM
  5. .raw file into 2d array
    By rorybreen1 in forum C Programming
    Replies: 2
    Last Post: January 30th, 2004, 12:02 PM

IMN logo majestic logo threadwatch logo seochat tools logo