以下数组具有相同的键和值,但仅提供便利,我需要将两者合并
[0] => stdClass Object
(
[room_id] => 15
[room] => deluxee
[price] => 2000.00
[amenities] => Swimming Pool
[photo_path] => 1\15\11790549875ba35c08e26b6.jpg
)
[1] => stdClass Object
(
[room_id] => 15
[room] => deluxee
[price] => 2000.00
[amenities] => Double Bedroom
[photo_path] => 1\15\11790549875ba35c08e26b6.jpg
)
所以我需要输出我该怎么办?
[0] => stdClass Object
(
[room_id] => 15
[room] => deluxee
[price] => 2000.00
[amenities] => stdClass Object
(
[0] => Swimming Pool
[1] =>Double Bedroom
)
[photo_path] => 1\15\11790549875ba35c08e26b6.jpg
)