Login   Register  
PHP Classes
elePHPant
Icontem

File: example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Nikita Pohilko  >  CSV_Parser  >  example.php  >  Download  
File: example.php
Role: Example script
Content type: text/plain
Description: Use example
Class: CSV_Parser
Parse records of data from CSV files
Author: By
Last change:
Date: 2010-12-09 05:06
Size: 451 bytes
 

Contents

Class file image Download
<?

  
### Include class
  
require 'CSVParser.class.php';
  
  
### Default linebreak style is NL_WIN(\r\n), also available NL_UNIX(\n) and NL_MAC(\r)
  ### You can specify filename later, by using CSVParser->setFilename() method
  
$csv = new CSVParser("sample.csv"CSVParser::NL_WIN);
  
  
### Set delimiter symbol, default ","
  
$csv->delimiter ",";
  
  
$data $csv->parse();
  
  echo 
"<pre>"print_r($datatrue) ."</pre>";

?>