我有一个关于如何给每个输出一个字符串的问题。
我的代码是:
try {
    $journals = new \Picqer\Financials\Exact\Journal($connection);
    $result   = $journals->get();
    foreach ($result as $journal) {
        echo 'Journal: ' . $journal->Description . '<br>';
    }
} catch (\Exception $e) {
    echo get_class($e) . ' : ' . $e->getMessage();
}
我的输出是:
Journal: Kasboek 
Journal: Memoriaal
Journal: Activamutaties
Journal: Inkoopboek
Journal: Bank
Journal: Verkoopboek
我希望所有输出都使用不同的字符串,以便可以将其导出到我的其他 api 站点。像这样的东西:
Kasboek = $1 Memoriaal = $2 etc..
请帮我解决这个问题
日志.php
<?php
namespace Picqer\Financials\Exact;
/**
 * Class Journal
 *
 * @package Picqer\Financials\Exact
 * @see https://start.exactonline.nl/docs/HlpRestAPIResourcesDetails.aspx?name=financialJournals
 *
 * @property String $Code BIC code of the bank where the bank account is held
 * @property Int32 $Division Division code
 * @property String $Description Description of BankAccount
 * @property Guid $ID Primary Key
 * @property String $Type Bank account number. Is mandatory for Journals that have Type = Bank
 */
class Journal extends Model
{
    use Query\Findable;
    use Persistance\Storable;
    protected $fillable = [
        'Code',
        'Division',
        'Description',
        'ID',
        'Type',
    ];
    protected $url = 'financial/Journals';
}