ok I I have the file parsed the way I want it. now I need to get specific parts of it back to submit to a database which I already have created. here is the code that I have and it parses the file nicely.
<?php
$row = 1;
$handle = fopen("C:test2.csv", "r");
while ($data = fgetcsv($handle, 1000, ",")) {
$num = count($data);
if ($data[0] == "CSPROV3") {
echo "<p> $num fields in line $row: <br />\n";
echo $num;
for ($c=0; $c < $num; $c++) {
echo $data[$c] . "<br />\n";
}
}
$row++;
}
fclose($handle);
?>
any help would be greatly appreciated 🙂