我想要我的 Exactonline 脚本的输出,例如我的脚本中的输出“Kasboek” autotask
“ $ticket->Title = '....'
”喜欢“ $ticket->Title = 'Kasboek'
”。如果有 6 个不同的输出我需要将它们分隔在不同的变量中,我该怎么做。
==================================================== ===
脚本 Exactonline
try {
$result = array();
$journals = new \Picqer\Financials\Exact\Journal($connection);
$result = $journals->get();
foreach ($result as $journal) {
echo $result[]= $journal->Description . '<br>';
}
json_encode($result);
} catch (\Exception $e) {
json_encode(array(get_class($e) . ' : ' . $e->getMessage()));
}
输出
Kasboek
Memoriaal
Activamutaties
Inkoopboek
Bank
Verkoopboek
==================================================== ===
脚本自动任务
$ticket = new ATWS\AutotaskObjects\Ticket();
$ticket->id= 0;
$ticket->AccountID = '';
$ticket->DueDateTime = '2015-12-17';
$ticket->Title = '.....';
$ticket->Status = 1;
$ticket->Priority = 1;
==================================================== ===
试过 @F.roster 比我的输出更详细...>
[{"Code":"10","Description":"Kasboek","Division":1741496,"ID":"846af4e2-209d-44aa-84f2-068ae65b69b5","Type":10},{"Code":"90","Description":"Memoriaal","Division":1741496,"ID":"91fc95a4-765e-4d8b-8271-63884be5e480","Type":90},{"Code":"95","Description":"Activamutaties","Division":1741496,"ID":"8ec1491e-51a4-46b8-87f0-a3134c83af4c","Type":90},{"Code":"60","Description":"Inkoopboek","Division":1741496,"ID":"11b1d819-4cdc-4f8c-9d60-aac2359c230b","Type":22},{"Code":"20","Description":"Bank","Division":1741496,"ID":"f8afe3cc-bcf1-4932-9fe0-b761ad48618f","Type":12},{"Code":"70","Description":"Verkoopboek","Division":1741496,"ID":"b4afe081-7f6b-46c7-9742-ea22302a4d55","Type":20},"Kasboek","Memoriaal","Activamutaties","Inkoopboek","Bank","Verkoopboek"]