Hi there,
The following data is in the first column of a CSV file:
NOKIA 6230|"URLHERE"|"IMAGEHERE"|"Video recorder and player
I'm using the following code to read the CSV file:
// Now read the csv
while(($fread = fgetcsv($fp, 1024, ",")) !== false) {
echo "<script type=\"text/javascript\">window.scrollByLines(10)</script>";
echo "<hr>Line being read is: ".$row."<br>"; flush();
echo "Number of columns: ".count($fread)."<br>"; flush();
echo "Creating MySQL query...<br>"; flush();
echo "<pre>";
print_r($fread['0']);
echo "</pre>";
Ok, obviously the code I've written there hasn't got all the closing brackets etc etc.
However, I've echoed out $fread['0'] - the first column - and it only shows "NOKIA 6230" - it doesn't show the rest. Yet on the last column in the CSV row... the data is as follows:
Voice recording up to 3 min"|"0.00"|"GBP"|"5616783"|"Telephones"|"availability: In Stock; brand: NOKIA; delivery time: We Aim To Deliver Free Within 5 Working Days; line rental: 30; operator: O2; tarrif name: O2 200"
For some reason, the above which to me is very similar to the first example of data, works, yet the first example obviously doesn't. :-|
Any help would be very much appreciated... been stuck on this for some time now. 🙂
Chris