Skip to content

cengizonkal/dat-reader

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<?php
require_once 'vendor/autoload.php';

/**
 * A large text file
 */
$fileName = 'example.dat';

/**
 * How fixed columns arranged
 * example: 10 characters for id, 13 characters for name
 */
$template = ['id' => 10, 'name' => 13];

/**
 * Create Reader
 */
$reader = new Conkal\DatReader\Reader($fileName, $template);

/**
 * Read each line as fixed column records
 */
$reader->open();
while ($record = $reader->read()) {
    var_dump($record);
}
$reader->close();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages