I am trying to read and display the content of a CSV file. For some reason it bugs out with this file I am trying to read.
This is my code.
<?php
if (($handle = fopen("http://testdummies.dk/csv/weird2.csv", "r")) !== FALSE) {
while (($data = fgetcsv($handle, 0, ";")) !== FALSE) {
echo "<pre>";
print_r ($data);
echo "</pre>";
}
fclose($handle);
}
?>
I use a danish CSV file so it uses ; instead of ,!
I have made this test at http://testdummies.dk/csv/testdups2.php
The first 3 arrays it generates are correct, but the 4th breaks out at "cell" 47. I just cant figure out why. (the file opens fine in excel).
The file is at http://testdummies.dk/csv/weird2.csv
Thanks in advance.
René