I'd like to take a CSV file living server-side and display it dynamically as an html table. E.g., this:
Name, Age, Sex "Cantor, Georg", 163, M   Name  Age  Sex  Cantor, Georg  163  M   
 The previously linked solution is a horrible piece of code; nearly every line contains a bug. Use fgetcsv instead:
\n\n"; $f = fopen("so-csv.csv", "r"); while (($line = fgetcsv($f)) !== false) < echo ""; foreach ($line as $cell) < echo "" . htmlspecialchars($cell) . " "; > echo " \n"; > fclose($f); echo "\n