I am attempting to write a php script, that will take an existing csv file, and open it for edit using the values of that file.
<?PHP
$file_handle = fopen("test.csv", "r");
while (!feof($file_handle) ) {
$line_of_text = fgetcsv($file_handle, 100000);
echo "<textarea name=textarea id=textarea cols=40 rows=4>$line_of_text[0]</textarea>";
echo "<textarea name=textarea id=textarea cols=40 rows=4>$line_of_text[1]</textarea>";
echo "</br></br>";
}
fclose($file_handle);
?>
Thats not that difficult. Where it gets hairy, is i also need to be able to add additional rows using the same template data. I can think of how to do this, some kind of count based on a user selected value that would render the above data (plus a line break) x number of times. Im just not sure how to do that. By the way, the csv file in question has 25 columns, i just put in the first 2 for the sake of saving space.
Also, once all this data is rendered, i need to save it in its entirety (all rows) to a NEW csv file.