<?php
$nomArch = "planilla.csv";
$recurso = fopen($nomArch,"r");
echo "<table border = '1'>";
while (!feof($recurso)) {
    $linea = fgets($recurso);
    $registro = explode(",",$linea);
if (trim($linea)!="") {
    echo "<tr>";
    echo "<td>".trim($registro[0])."</td>";
    echo "<td>".trim($registro[1])."</td>";
    echo "<td>".trim($registro[2])."</td>";
    echo "<td>".trim($registro[3])."</td>";
    echo "<td>".trim($registro[4])."</td>";
    echo "<td>".trim($registro[5])."</td>";
    echo "<td>".trim($registro[6])."</td>";
    echo "<td>".trim($registro[7])."</td>";
    echo "<td>".trim($registro[8])."</td>";
    echo "<td>".trim($registro[9])."</td>";
    echo "<td>".trim($registro[10])."</td>";
    echo "</tr>";
}
}
echo "</table>";
fclose($recurso);
?>