I am stumped at this... I am trying to list all the files in a directory and pull some info from them (specifically their csv files... and I need to print out the first row of each.)

Well, It will only actually print <60 rows in the browser, I have tried everything. Can anyone help/give me some advice? I'm not the best coder, but I just need this to work. :(

Code:

```
<style>
    .demo {
        border:3px solid #000000;
        border-collapse:collapse;
        padding:5px;
    }
    .demo th {
        border:3px solid #000000;
        padding:5px;
        background:#F0F0F0;
    }
    .demo td {
        border:3px solid #000000;
        padding:5px;
        background:#DCC4FD;
    }
</style>
<?php
exec('ulimit -S -n 9999999999');
echo "Current Simulations for the next 24 hours.";
$path = ".";
$dh = opendir($path);
$i=1;
echo '<html><body><table class="demo">\n\n';
while (($file = readdir($dh)) !== false) {
    if($file != "." && $file != ".." && $file != "index.php" && $file != ".htaccess" && $file != "error_log" && $file != "cgi-bin") {
        if(fnmatch('*.csv', $file)) {
        $content = file($file);
        echo "<td> $file </td>";
        echo "\n<td>".str_replace(array(","), array("</td><td>", "</td>\n<td>"), $content[1])."</td>";
        echo "</tr>";
        }
        $i++;
    }
}
fclose($handle);
closedir($dh);
?> 

```

See here: <http://35.188.166.151/>