Home > Article > Backend Development > 数组针对某项的求和有关问题
数组针对某项的求和问题
已知数组a:
<br />array (<br /> 0 => <br /> array (<br /> 'stock_no' => 'SU13080800340',<br /> 'adress' => 'B',<br /> 'arr_time' => '2013-08-14 09:00:00',<br /> 'c_type' => 'P32E',<br /> 'cust_no' => '310F61VA5A',<br /> 'mount_total' => '1',<br /> 'total' => '16',<br /> 'c1_time' => '2013-08-10 15:00:00',<br /> 'packageno' => 'CVT121015001',<br /> ),<br /> 1 => <br /> array (<br /> 'stock_no' => 'SU13080800340',<br /> 'adress' => 'B',<br /> 'arr_time' => '2013-08-14 09:00:00',<br /> 'c_type' => 'P32E',<br /> 'cust_no' => '310F61VA5B',<br /> 'mount_total' => '2',<br /> 'total' => '32',<br /> 'c1_time' => '2013-08-10 15:00:00',<br /> 'packageno' => 'CVT121015002',<br /> ),<br /> 2 => <br /> array (<br /> 'stock_no' => 'SU13080800340',<br /> 'adress' => 'B',<br /> 'arr_time' => '2013-08-14 09:00:00',<br /> 'c_type' => 'P32E',<br /> 'cust_no' => '310F61VA5B',<br /> 'mount_total' => '2',<br /> 'total' => '32',<br /> 'c1_time' => '2013-08-10 15:00:00',<br /> 'packageno' => 'CVT121226001',<br /> ),<br />)<br />