I have code that opens a CSV file and loops through every row of data and creates a table from it.
There are specific columns I'd like to ignore. How do I change my code to not display certain columns?
<?php
echo "<table>\n\n";
$f = fopen("users.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>";
3,4,20.