PHP - Upload a CSV file & print specific rows ← (PHP)

one text

Solution:

Actually, I did figured out with this, by looping, setting and echoing the variables. I still don't know if it's the best way of doing it but it actually works :

$row = 1;
if (($handle = fopen("upload/" . $storagename, "r")) !== FALSE) {
    while (($data = fgetcsv($handle, 1000, ",")) !== FALSE) {
        $num = count($data);
        $row++;
$kilometrage = $data[11];
$stationnement = $data[12];
$perdiem = $data[13];
$depenses = $data[14];
        for ($c=0; $c < 1; $c++) {
            echo "<table style='min-width:1000px;'><tbody><tr>";
            echo "<td style='width:25%'>" . $kilometrage . "</td>";
            echo "<td style='width:25%'>" . $stationnement . "</td>";
            echo "<td style='width:25%'>" . $perdiem . "</td>";
            echo "<td style='width:25%'>" . $depenses . "</td>";
            echo "</tr></tbody></table>";
        }
    }
    fclose($handle);
}

Source