PHP code example of clover / text-ltsv

1. Go to this page and download the library: Download clover/text-ltsv library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

clover / text-ltsv example snippets



$ltsv = new Clover\Text\LTSV();

$values = $ltsv->parseLine("hoge:foo\tbar:baz");

$values = $ltsv->parseFile('log.ltsv');

$it = $ltsv->getIteratorFromFile('log.ltsv');
foreach ($it as $values) {
    // do something
}

$ltsv->add('hoge', 'foo')->add('bar', 'baz');
$line = $ltsv->toLine();