Kvalitetsjekk av CSV

Til bunnen

= 3) { $det = ";"; } // It returned 3 or more cells, it is most likely ";" else { $det = ","; } // It dident return 3 or more cells, so then it should be "," $fp = fopen("products.csv", "r"); // Reopen to read from beginning echo ""; // Create tables echo ""; // Headings while($data = fgetcsv($fp, 1000, $det)) { // LOOP thru the file with correct $det echo ""; // Show product information } echo "
Artikkel Nummer:Produktnavn:Pris per enhet
{$data[0]}{$data[1]}{$data[2]}
"; // End table ?>