【发布时间】:2016-01-24 13:36:44
【问题描述】:
我的对象看起来像
{ ["message"]=> object(Google_Service_Gmail_Message)#154 (14)
{ ["historyId"]=> string(4) "1001"
["id"]=> string(16) "15096ab785de59868a"
["internalDate"]=> string(13) "1445635228000"
["labelIds"]=> array(4)
{ [0]=> string(5) "INBOX"
[1]=> string(9) "IMPORTANT"
[2]=> string(17) "CATEGORY_PERSONAL"
[3]=> string(6) "UNREAD" }....
我的问题是,对于history id,我可以通过$message->historyId 得到它。
但是我如何在视图页面中呈现labelIds 内容。我特别喜欢UNREAD。我该怎么办?
【问题讨论】:
-
type $message->labelIds 然后你会得到一个数组,然后foreach这个数组你会得到输出。
-
$message->labelIds[3]?