我有一个这样的数组
Array
(
[0] => Array
(
[employee_id] => 2
[project_name] => WeeFavR
[project_planned_hour] => 500
[module_name] => Design
[project_module_time] => 150
[allocated_time] => 50
)
[1] => Array
(
[employee_id] => 2
[project_name] => WeeFavR
[project_planned_hour] => 500
[module_name] => Coding
[project_module_time] => 250
[allocated_time] => 200
)
[2] => Array
(
[employee_id] => 2
[project_name] => WeeFavR
[project_planned_hour] => 500
[module_name] => Testing
[project_module_time] => 100
[allocated_time] => 50
)
[3] => Array
(
[employee_id] => 2
[project_name] => Online License
[project_planned_hour] => 600
[module_name] => Design
[project_module_time] => 200
[allocated_time] => 100
)
[4] => Array
(
[employee_id] => 2
[project_name] => Online License
[project_planned_hour] => 600
[module_name] => Coding
[project_module_time] => 200
[allocated_time] => 100
)
[5] => Array
(
[employee_id] => 2
[project_name] => Online License
[project_planned_hour] => 600
[module_name] => Testing
[project_module_time] => 200
[allocated_time] => 100
)
)
我想要这样的结果
Array
(
[0] => Array
(
[employee_id] => 2
[project_name] => WeeFavR
[project_planned_hour] => 500
Array
(
[0] => Array
(
[module_name] => Design
[project_module_time] => 150
[allocated_time] => 50
)
[1] => Array
(
[module_name] => Coding
[project_module_time] => 250
[allocated_time] => 200
)
[2] => Array
(
[module_name] => Testing
[project_module_time] => 100
[allocated_time] => 50
)
)
)
[1] => Array
(
[employee_id] => 2
[project_name] => Online License
[project_planned_hour] => 600
Array
(
[0] => Array
(
[module_name] => Design
[project_module_time] => 200
[allocated_time] => 100
)
[1] => Array
(
[module_name] => Coding
[project_module_time] => 200
[allocated_time] => 100
)
[2] => Array
(
[module_name] => Testing
[project_module_time] => 200
[allocated_time] => 100
)
)
)
)
我不知道如何制作这种类型的数组,所以请帮我解决这个问题。您的帮助将不胜感激。