Phenix_File_Parser_Csv
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']; } |
Related posts:
If you enjoyed this post, please consider to leave a comment or subscribe to the feed and get future articles delivered to your feed reader.
Facebook comments:

