【发布时间】:2022-01-10 03:29:32
【问题描述】:
我有数据数组:
Array
(
[0] => Illuminate\Support\Collection Object
(
[items:protected] => Array
(
[0] => stdClass Object
(
[product_id] => 780
)
[1] => stdClass Object
(
[product_id] => 789
)
[2] => stdClass Object
(
[product_id] => 800
)
[3] => stdClass Object
(
[product_id] => 769
)
)
)
)
如何在数组上获取仅数据值?
需要输出$data = '780','789','800','769';
【问题讨论】:
-
这能回答你的问题吗? How to convert an array to object in PHP?