note 101072 deleted from function.fgetcsv by danbrown

From: Date: Wed, 24 Nov 2010 15:57:07 +0000
Subject: note 101072 deleted from function.fgetcsv by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-174330@lists.php.net to get a copy of this message
Note Submitter: etimar at perval dot fr ---- Hi All, This is a simplification of the function posted by Mustapha (a simple function to return 2 Dimensional array by parsing a CSV file) <?php function get2DArrayFromCsv($file,$delimiter) { $data2DArray = array(); if (($handle = fopen($file, "r")) !== FALSE) { while (($lineArray = fgetcsv($handle, 4000, $delimiter)) !== FALSE) { $data2DArray[] = $lineArray; } fclose($handle); } return $data2DArray; } ?>

« previous php.notes (#174330) next »