note 60368 added to function.fgetcsv
| From: | juha at kinesissurvey dot com | Date: | Wed, 04 Jan 2006 22:55:46 +0000 |
| Subject: | note 60368 added to function.fgetcsv | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-101229@lists.php.net to get a copy of this message | ||
On PHP 4.4 fgetcsv refuses to work:
$values=fgetcsv($fileh); DOESN'T WORK
To get it working you need to add line lenght and the separator!
$values=fgetcsv($fileh,32000,","); WORKS
BEWARE that example will get you into endless loop!
Use
while($values=fgetcsv($fileh,32000,","))
{
// Processing here
}
----
Manual Page -- http://www.php.net/manual/en/function.fgetcsv.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+60368
Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+60368&report=yes&reason=added+to+the+manual
Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+60368&report=yes&reason=bad+code
Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+60368&report=yes&reason=spam
Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+60368&report=yes&reason=useless
Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+60368&report=yes&reason=non-english
Delete: already in docs -- http://master.php.net/manage/user-notes.php?action=delete+60368&report=yes&reason=already+in+docs
Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+60368&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+60368&report=yes
Search -- http://master.php.net/manage/user-notes.php