You can do the opposite here
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
<?php echo "<html><body><table>\n\n"; $f = fopen("my-data.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>"; ?> |