Closed shgysk8zer0 closed 9 years ago
Since this is meant to be a generic parser and CSV is a common form of storing data, I'll use this to remind myself of a method of reading/writing CSV.
$handle = fopen('test.csv', 'r');
$csv = [];
while ($row = fgetcsv($handle)) {
$csv[] = $row;
}
fclose($handle);
$handle = fopen('out.csv', 'a+');
foreach($csv as $row) {
fputcsv($handle, $row);
}
fclose($handle);
Really wish that I had the fgetcsv
function earlier... Would have saved me a whole lot of trouble.
Resolved in commit f8ea3801d8c68c6080b4f2c22a6e068faa1e5c1f
Should be able to parse INI, JSON, & XML files. Try to have the results be as similar as possible (may require a lot of work when it comes to XML).