fgetcsv doesn't return an array?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I thought that fgetcsv returned an array. I can work with it like an array but I get the following warning when using it

|Warning:  implode(): Invalid arguments passed on line 155

154	$csvCurrentLine = fgetcsv($csvFile, 4096, ',');
155	$currentLine = implode(",", $csvCurrentLine);
|

Everything that I have read online indicates that it is because $csvCurrentLine is not declared as an array. Adding a line to the code

153 |$csvCurrentLine = array();

Does not get rid of the warning. The warning isn't interfering with the script working, but it us annoying. Does anyone know the solution?

Thanks!

Jay
|

[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux