note 15450 added to function.fgetcsv

From: Date: Tue, 11 Sep 2001 11:12:14 +0000
Subject: note 15450 added to function.fgetcsv
Groups: php.notes 
Request: Send a blank email to php-notes+get-17896@lists.php.net to get a copy of this message
For all who would like to have fgetcsv working in PHP3 like in PHP4: (PHP3 doesn't like the deliminator-parameter... and, worst of all, it expects "," instead of ";" or "|" as default-deliminator) ################################### function fgetcsv_ ($file, $count, $deliminator=",") { $line = fgets($file, $count); $dataarray=explode($deliminator, $line); if ($line) return ($dataarray); else return ($line); } # end function fgetcsv2 ################################### http://www.php.net/manual/en/function.fgetcsv.php

« previous php.notes (#17896) next »