Skip to content
Allows you to iterate through a file and read each line by line and parse each row into an array regardless of file type
Find file
Pull request Compare This branch is 6 commits behind IamSmith:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
Examples
Exception
Extension
Test
.gitignore
.travis.yml
PhpReader.php
README.md

README.md

PHP Reader

build status

Allows you to iterate through a file and read each line by line and parse each row into an array regardless of file type.

It will use the file extension to determine the file type. Using the files mime type to determine its type is unreliable across all systems.

Supported File Extensions:

  • CSV - Comma Separated Value
  • PSV - Pipe (|) Separated Value
  • XLS - Excel document
  • XLSX - Excel 2007 document

Installation

 cd /usr/share/php
 sudo git clone git://github.com/IamSmith/PHPReader.git

Options

Additional options which will change the behaviour of the functionality.

PhpReader::OPTION_IGNORE_HEADER_ROW if passed as an option will assume the first row of the file is data as well.

PHP Excel

In order to handle the Excel file types PHP Reader will use the PHPExcel pear package.

PHPExcel Links:

Credits

Tom Smith

Follow @phpreader on twitter

Follow @smithy07 on twitter

Licence

Licenced under the New BSD License

Something went wrong with that request. Please try again.