oto/reader-file

Read rows in a file and then returns

Maintainers

Details

github.com/Otooo/Reader

Source

Issues

Installs: 7

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 1

Forks: 0

Open Issues: 0

pkg:composer/oto/reader-file

1.0.0 2020-01-08 01:17 UTC

This package is auto-updated.

Last update: 2025-12-09 02:34:29 UTC


README

A library that reads the content of some types of files and returns an array containing this data.

Requirements

  • PHP >= 4.2.0
  • Composer

Installation

In project folder:

composer require oto/reader-file

Readable files

  • CSV

How to use

<?php

use ReaderFile\ReadCSV;

...
{
    ...() 
    {
        $filePath = 'path of the file';
        try {
            $result = ReadCSV::readFile($filePath, 'delimiter, default is ;');
        } catch (\Exception $ex) {
            echo $ex->getMessage();
        }
        echo $result;
    }
}

Simplifying

ReaderFile\ReadCSV::readFile('filePath', 'delimiter, default is ;');