PHP code example of kouinkouin / php-coda-parser

1. Go to this page and download the library: Download kouinkouin/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/ */

    

kouinkouin / php-coda-parser example snippets




use Codelicious\Coda\Parser;

$parser = new Parser();
$statements = $parser->parseFile('coda-file.cod', 'simple');

foreach ($statements as $statement) {
    echo $statement->date . "\n";

    foreach ($statement->transactions as $transaction) {
        echo $transaction->account->name . ": " . $transaction->amount . "\n";
    }

    echo $statement->new_balance . "\n";
}
sh
composer