PHP CSV to Table


<?php
echo "<html><body><table>\n\n";
$f = fopen("so-csv.csv", "r");
while (($line = fgetcsv($f)) !== false) {
        echo "<tr>";
        foreach ($line as $cell) {
                echo "<td>" . htmlspecialchars($cell) . "</td>";
        }
        echo "</tr>\n";
}
fclose($f);
echo "\n</table></body></html>";
?> 
 
 

How to Install PHP 8.3 on Ubuntu 26.04, 24.04 and 22.04

 importar chave repo sudo apt install -y ca-certificates curl sudo curl -fsSLo /usr/share/keyrings/deb.sury.org-php.gpg https://packages.sur...

Mais vistos