QUOTE(BeatMasta A @ 8 Nov, 2009 - 05:23 AM)

If the problem is to read and close many files at once, like MANY files from one directory, I would readdir() first, get list of files in an array, then make a loop for($i=0; $i<sizeof($myArray); $i++) which reads and closes each $myArray[$i] file like $handle = fopen($myArray[$i], "a+");
thanks for replying.let me explain my problem a bit more than you we be able to answar exactly what i want .so here is the problem.
i have to open files from a directory in a text area element in my application.i want to check these files for duplicate contents one at a time.as for as checking one file it is easay.but when i want to perform these task on more than one files i have no idea how to open these fiels one by one and perform the duplication check on each of them.i want to open these files in controlled manner.i.e open one file perform the proceesing on it and than the next and so on.thanks.