Skip to content

Instantly share code, notes, and snippets.

@rymate1234
Created October 23, 2014 16:35
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rymate1234/5effab47461f0d600b36 to your computer and use it in GitHub Desktop.
Save rymate1234/5effab47461f0d600b36 to your computer and use it in GitHub Desktop.
<html>
<head><title>Testing</title></head>
<body style="font-family: 'Segoe UI';">
<?php
// this will read a 3 column csv file and spew it onto a web page
$myfile = fopen ("people.csv", "r");
?>
<table style="border-style: solid; border-width: 1px;" >
<?php
while (!feof ($myfile))
{
$buffer = fgets($myfile);
$exploded = explode(",", $buffer);
echo("<tr><td> $exploded[0] </td><td> $exploded[1] </td><td> $exploded[2] </td></tr>");
};
?>
</table>
<?php
fclose($myfile);
?>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment