PHP code example of codelicious / php-belgianbankstatement-parser
1. Go to this page and download the library: Download codelicious/php-belgianbankstatement-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/ */
codelicious / php-belgianbankstatement-parser example snippets
use Codelicious\BelgianBankStatement;
$parser = new Parser();
$statement = $parser->parseFile('coda-file.cod', 'coda');
echo $statement->getDate()->format('Y-m-d') . "\n";
foreach ($statement->getTransactions() as $transaction) {
echo $transaction->getAccount()->getName() . ": " . $transaction->getAmount() . "\n";
}
echo $statement->newBalance() . "\n";
if (mb_detect_encoding($content, ['UTF-8', 'ISO-8859-1']) === 'ISO-8859-1') {
// use mb_convert_encoding($content, to_encoding, from_encoding) to convert to UTF-8
$content = mb_convert_encoding($content, "UTF-8", "ISO-8859-1");
}
json
{
"icious/php-belgianbankstatement-parser": "^2.0"
}
}