Download the PHP package gugglegum/csv-rw without Composer

On this page you can find all versions of the php package gugglegum/csv-rw. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package csv-rw

CSV Reader & Writer

This is easy to use Composer package to read and write CSV files in very convenient way. The CSV Reader is actually an OO-wrapper on the fgetcsv() built-in PHP function. It adds exceptions on errors and implements Iterator interface. You can iterate CSV reader in foreach statement like array. It supports headers of columns, so you may handle with associative data arrays. Headers may be read from first line of CSV file or be set manually. Or be read from first line and then changed by some reflection function or whatever you want.

Instead of opening you also can assign already opened file handle or stream. This package contains validation of data consistency. For example, it throws an exception if some row contains less or more columns than previous one. Therefore you don't need to always check type of return values. Just use try .. catch statement and catch exceptions if necessary. The package uses strong typing for scalars came to us from PHP7.

Usage

See more examples of usage in /test folder.

Read CSV

Write CSV

Installation

This library is available as composer package. To start using composer in your project follow these step

Install Composer

Install this package

Add composer's autoloader to you code

Now you can use CSV reader & writer in your code.

Troubleshooting

If you have troubles with MAC's line-endings \r, you may turn on PHP option auto_detect_line_endings:

When turned on, PHP will examine the data read by fgets() and file() to see if it is using Unix, MS-Dos or Macintosh line-ending conventions.

It may be turned on from you PHP code. Just add this before reading MAC files:


All versions of csv-rw with dependencies

PHP Build Version
Package Version
Requires php Version >=7.0.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package gugglegum/csv-rw contains the following files

Loading the files please wait ....