My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
load  
Updated Feb 4, 2010 by kazu....@gmail.com

Method:load

csv file loader

indicates the object which file is to be loaded

require_once 'File/CSV/DataSource.php';

$csv = new File_CSV_DataSource;
$csv->load('my_cool.csv');
var_export($csv->connect());

array (
0 =>
array (
'name' => 'john',
'age' => '13',
'skill' => 'knows magic',
),
1 =>
array (
'name' => 'tanaka',
'age' => '8',
'skill' => 'makes sushi',
),
2 =>
array (
'name' => 'jose',
'age' => '5',
'skill' => 'dances salsa',
),
)
  1. Argument string $filename the csv filename to load
  • Visibility public
  • Returns boolean true if file was loaded successfully
  • Also see isSymmetric(), getAsymmetricRows(), symmetrize()

Sign in to add a comment
Powered by Google Project Hosting