ok here is my dilemma...basically I have a csv file which I have already parsed using fgetcsv(). now I need to take the array it returns and find certain pieces of data in it. I was wondering if someone could give me some insight on how to do this. here is what I have written so far.
<?
$row = 1;
$handle = fopen("C:test2.csv", "r");
while ($data = fgetcsv($handle, 2048, ",")) {
$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 tips would be greatly appreciated 🙂