Hey guys, tried to search for this, although I am not even sure what I am searching for. My problem is this:

Code:
$.getJSON('process.countfiles.php?action=getfiles', function(data) {
	$.each(data, function(name, value){
		$("#displayfile").load("process.files.php?file="+value, function(){
		});
	});
});
OK, I am having a script (process.countfiles.php) with 2 functions, 1 - count the files and build a file list in a .dat file. Then number 2 is open the .dat file and process the files individually.

The first parts works great, so let move to the second part... I have the data being passed from PHP like this:

PHP Code:
    $fh fopen($dirdatafn"r");
        while (!
feof($fh)){
            
$data_file_line[] .= fgets($fh);
        }
        @
fclose ($fh);
        echo 
json_encode($data_file_line); 
Now back to the JS (jQuery is the framework I am using for this) data is the array of $data_file_line from the PHP, it gets the data with no problem, then it should start separating them with the .each

The problem is, it will try loading all 7,000+ at the same time and send them all to the process.files.php, when I would like it to handle one at a time.

Any help would be appreciated.

Thank you,
Jeff