'; $f = fopen("loghits.csv", "r"); while (($line = fgetcsv($f)) !== false) { if ($row == 1) { echo ''; foreach ($line as $cell) { echo '' . htmlspecialchars($cell) . ""; } echo "\n"; }else{ echo ''; foreach ($line as $cell) { echo '' . htmlspecialchars($cell) . ""; } echo "\n"; } $row++; } fclose($f); echo "\n"; ?>