我正在使用此api for trello(https://github.com/cdaguerre/php-trello-api),而我只想尝试获取新创建的卡片的ID。
$card = $manager->getCard();
$card
->setDueDate($due)
->setName('Order ' . $x[0]['job_no'] . ' [' . $x[0]['vendorAdd']. ']')
->setDescription($description)
->setPosition('top')
->save();
如果我这样做:
echo "<pre>";
print_r($card);
echo "<pre>;
我可以在数组中看到id,但我怎样才能访问它?
[data:protected] => Array
(
[id] => 5911248b7235447f23768e69
[badges] => Array
(
[votes] => 0
[viewingMemberVoted] =>
[subscribed] =>
[fogbugz] =>
[checkItems] => 0
[checkItemsChecked] => 0
[comments] => 0
[attachments] => 0
[description] => 1
[due] => 2017-05-10T14:00:00.000Z
[dueComplete] =>
)
[checkItemStates] => Array
(
)
[closed] =>
[dueComplete] =>
[dateLastActivity] => 2017-05-09T02:08:11.421Z
答案 0 :(得分:0)
老问题我知道,但答案可以节省我一点时间......
{{1}}