我正在尝试循环遍历一个多维数组,以下是代码。我想要一个函数,可以将数组传递给它并传递需要删除的键。函数大致长这样:function removeItemFromMArray($YourArray, $RemoveKeyNamed);。
stdClass Object
(
[products] => Array
(
[0] => stdClass Object
(
[title] => New Balance - Variable Demo
[created_at] => 2013-07-24T14:35:21Z
[updated_at] => 2013-07-24T14:35:21Z
[type] => variable
[status] => publish
[downloadable] =>
[virtual] =>
)
[1] => stdClass Object
(
[title] => Mismo - Briefcase
[created_at] => 2013-06-10T13:18:17Z
[updated_at] => 2013-06-10T13:18:17Z
[type] => simple
[status] => publish
[downloadable] =>
[virtual] =>
)
)
)
我想要删除ID,并返回一个除了ID以外的新数组。
stdClass
对象数组。 - salathe