Skip to content

Instantly share code, notes, and snippets.

@bigpresh
Created January 31, 2011 22:23
Show Gist options
  • Save bigpresh/804963 to your computer and use it in GitHub Desktop.
Save bigpresh/804963 to your computer and use it in GitHub Desktop.
PHP CSV parsing example for Jim
[davidp@supernova:~/tmp/php-csv-test]$ php php-csv-test.php
array (
0 =>
array (
'name' => 'David Precious',
'age' => '29',
'comment' => 'rocks',
),
)
<?php
require_once 'File_CSV_DataSource-1.0.1/DataSource.php';
$csv = new File_CSV_DataSource;
$csv->load('test.csv');
var_export($csv->connect());
?>
name age comment
David Precious 29 rocks
@bigpresh
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment