Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

read csv php

$file = "file.csv";

$csv            =   new SplFileObject($file);
$csv            ->  setFlags(SplFileObject::READ_CSV);
$csv            ->  setCsvControl(';');  //separator change if you need

foreach( $csv as $ligne){
    print_r($ligne);  //$ligne is an array
}
 
PREVIOUS NEXT
Tagged: #read #csv #php
ADD COMMENT
Topic
Name
5+7 =