Jay Blanchard wrote:
154     $csvCurrentLine = fgetcsv($csvFile, 4096, ',');
155     $currentLine = implode(",", $csvCurrentLine);

I am using it in a loop. End Of File is an error?

You certainly need to break out on $csvCurrentLine = false which indicates end of file at least.

My own 'loop' is
$row=0;
while (($data = fgetcsv($handle, 800, ",")) !== FALSE) {
  if ( $row ) $contact->RecordLoad( $data, $row );
        $row++;
}
The row bit strips the header line from the csv file ...

--
Lester Caine - G8HFL
-----------------------------
Contact - http://lsces.co.uk/wiki/?page=contact
L.S.Caine Electronic Services - http://lsces.co.uk
EnquirySolve - http://enquirysolve.com/
Model Engineers Digital Workshop - http://medw.co.uk//
Firebird - http://www.firebirdsql.org/index.php

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to