note 31925 added to function.fgetcsv

From: Date: Fri, 09 May 2003 07:12:59 +0000
Subject: note 31925 added to function.fgetcsv
Groups: php.notes 
Request: Send a blank email to php-notes+get-47723@lists.php.net to get a copy of this message
This is the solution to Microsoft Excel csv file - this function add last delimiter in line. <?php function delimiter() { if (is_file("file.csv")) { $fp = fopen($file.csv,"r"); while (false!=($line = fgets($fp))) { $line = "$line;"; putf($line); } fclose($fp); } } //puts dedlimited line in new file function putf($line) { $fp = fopen($file,"a"); fputs($fp,$line); fclose($fp); } /* this readsl line at the time and adds ; as delimiter on line end. Its easy and helpfull*/ delimiter(); ?> -- http://www.php.net/manual/en/function.fgetcsv.php http://master.php.net/manage/user-notes.php?action=edit+31925 http://master.php.net/manage/user-notes.php?action=delete+31925 http://master.php.net/manage/user-notes.php?action=reject+31925

« previous php.notes (#47723) next »