我想要一个数组中的和monthly_rental
是否arc
相同。month
full_name
输入数组
Array
(
[0] => Array
(
[0] => Array
(
[id] => 521
[full_name] => Nilesh chauhan
[monthly_rental] => 15000
[arc] => 180000
[month] => 1
)
)
[1] => Array
(
[0] => Array
(
[id] => 1549
[full_name] => Ritesh shah
[monthly_rental] => 14166.666666667
[arc] => 170000
[month] => 2
)
[1] => Array
(
[id] => 589
[full_name] => Gajanan satpute
[monthly_rental] => 14166.666666667
[arc] => 170000
[month] => 2
)
[2] => Array
(
[id] => 521
[full_name] => Nilesh chauhan
[monthly_rental] => 13333.333333333
[arc] => 160000
[month] => 2
)
[3] => Array
(
[id] => 1549
[full_name] => Ritesh shah
[monthly_rental] => 11250
[arc] => 135000
[month] => 2
)
[4] => Array
(
[id] => 521
[full_name] => Nilesh chauhan
[monthly_rental] => 7500
[arc] => 90000
[month] => 2
)
[5] => Array
(
[id] => 1549
[full_name] => Ritesh shah
[monthly_rental] => 7000
[arc] => 84000
[month] => 2
)
)
[2] => Array
(
[0] => Array
(
[id] => 1549
[full_name] => Ritesh shah
[monthly_rental] => 35833.333333333
[arc] => 430000
[month] => 3
)
[1] => Array
(
[id] => 1549
[full_name] => Ritesh shah
[monthly_rental] => 14166.666666667
[arc] => 170000
[month] => 3
)
[2] => Array
(
[id] => 521
[full_name] => Nilesh chauhan
[monthly_rental] => 13333.333333333
[arc] => 160000
[month] => 3
)
[3] => Array
(
[id] => 521
[full_name] => Nilesh chauhan
[monthly_rental] => 8750
[arc] => 105000
[month] => 3
)
[4] => Array
(
[id] => 589
[full_name] => Gajanan satpute
[monthly_rental] => 7500
[arc] => 90000
[month] => 3
)
[5] => Array
(
[id] => 1549
[full_name] => Ritesh shah
[monthly_rental] => 6493.3333333333
[arc] => 77920
[month] => 3
)
)
)
第一个和第二个索引中有 6 个子数组,我想要0,1,5 (Ritesh Shah, Month 2)
数组的总和并使它们唯一。与此相同,我有一个很长的数组列表,但如果你们中的任何人只是向我建议如何获取该数组的总和值,我将管理它们。
我想要的输出:
Array
(
[0] => Array
(
[0] => Array
(
[id] => 521
[full_name] => Nilesh chauhan
[monthly_rental] => 15000
[arc] => 180000
[month] => 1
)
)
[1] => Array
(
[0] => Array
(
[id] => 1549
[full_name] => Ritesh shah
[monthly_rental] => 32416.66
[arc] => 389000
[month] => 2
)
[1] => Array
(
[id] => 589
[full_name] => Gajanan satpute
[monthly_rental] => 14166.666666667
[arc] => 170000
[month] => 2
)
[2] => Array
(
[id] => 521
[full_name] => Nilesh chauhan
[monthly_rental] => 20833.33
[arc] => 250000
[month] => 2
)
)
...