PHP code example of jwadin / php-coda-parser
1. Go to this page and download the library: Download jwadin/php-coda-parser 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/ */
jwadin / php-coda-parser example snippets
use Codelicious\Coda\Parser;
$parser = new Parser();
$statements = $parser->parseFile('coda-file.cod');
foreach ($statements as $statement) {
echo $statement->getDate()->format('Y-m-d') . "\n";
foreach ($statement->getTransactions() as $transaction) {
echo $transaction->getAccount()->getName() . ": " . $transaction->getAmount() . "\n";
}
echo $statement->getNewBalance() . "\n";
}
json
{
"icious/php-coda-parser": "^2.0"
}
}
sh
composer