Skip to content

Instantly share code, notes, and snippets.

@wozozo wozozo/read_csv.php
Created Jul 22, 2008

Embed
What would you like to do?
test
<?php
$handle = fopen('file.csv', 'r');
while ($a=fgetcsv($handle)) {
$b[] = $a;
}
echo "<table border='1'>";
foreach ($b as $v) {
echo "<tr>";
for ($i=0; $i < count($v); $i++) {
echo "<td>$v[$i]</td>";
}
echo "</tr>";
}
echo "</table>";
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.