juin
26
If you need a CSV parser in PHP, this class is for you.
You can download the class from the repository of PhenixApp project : Phenix_File_Parser_Csv
This class open the CSV file, parse the data into the object and after you just need to use the object like an array.
1 2 3 4 5 6 7 8 9 10 | $csvParser = new Phenix_File_Parser_Csv( $filename, //CSV file name 1, //Start at row 1 array(0 => "id", 1 => "title", 2 => "detail", 3 => "lastupdate") //Column expected to read in the CSV file. ); //use like an array foreach($csvParser as $key=>$value) { $date = $value['lastupdate']; } |
Tags: array, class, CSV, csv file, CSV parser, phenix, Phenix_File_Parser_Csv, PHP, repository, Zend Framework
Related posts:
- Phenix_Wiki, a parser componant for Zend Framework
- Phenix_View_Helper_Text2image
- How to use Flickr with Zend Framework?
- Le projet PhenixApp
- Phenix_View_Helper_Text2image (English)
Tags: array, class, CSV, csv file, CSV parser, phenix, Phenix_File_Parser_Csv, PHP, repository, Zend Framework