note 98632 deleted from function.fgetcsv by danbrown
| From: | danbrown@php.net | Date: | Mon, 28 Jun 2010 12:45:53 +0000 |
| Subject: | note 98632 deleted from function.fgetcsv by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-170519@lists.php.net to get a copy of this message | ||
Note Submitter: mr dot joebert at gmail dot com
----
@carlosh
You can force FALSE to be an empty array via type-casting / type-juggling.
<?php
while(!feof($fp)){
$line = (array) fgetcsv($fp,4096,',','"');
foreach($line as $key=>$value){
// ....
}
}
?>