Within a wordpress plugin, I have a PHP function which transform $file_name (a CSV file) into a table.
function displayAsTable($file_name)
{
echo '<table>';
ini_set('auto_detect_line_endings',TRUE);
$f = fopen($file_name, "r");
while (($line = fgetcsv($f,0,",")) !== false) {
echo '<tr>';
echo '<td><input type="checkbox" name="addressXX" value="'.$line[2].'" name=""/></td>';
foreach ($line as $cell) {
echo '<td>' . htmlspecialchars($cell) . '</td>';
}
echo '<tr>';
}
fclose($f);
echo '</table>';
}
The problem is that I would like to add the new ROWS and COLUMNS into an existing TABLE within the same page! How could I do that easily?