我想从多维数组中构造子 n 个数组,这取决于数据。例如:我有一个主数组作为
Array
(
[0] => Array
(
[id] => 1
[status] => -1
)
[1] => Array
(
[id] => 2
[status] => 1
)
[2] => Array
(
[id] => 3
[status] => 2
)
[3] => Array
(
[id] => 4
[status] => 2
)
[4] => Array
(
[id] => 5
[status] => 2
)
)
我想从此数组中获取 3 个数组,这取决于状态值的编号和类型,例如
array{
[0]=array(
[status]=-1
[count]=1
)
[1]=array(
[status]=1
[count]=1
)
[2]=array(
[status]=2
[count]=3
)
}
提前致谢,
苏尼尔·库马尔 P