如何比較當前數組值與以前的數組值?示例如果我有以下數組並且想比較[BM1367 PD C 70] [ST00576] ['transferfrom']與先前的數組是[BM1367 PD B 85] [ST00576] ['transferfrom']?將數組值與前一個數組值比較
[BM1367 PD B 85] => Array
(
[ST00576] => stdClass Object
(
[transferfrom] => 102
[transferto] => 66
[BR_ID] => 102
[refno] =>
)
[OT01606] => stdClass Object
(
[transferfrom] => 102
[transferto] => 66
[BR_ID] => 66
[refno] => 102 - ST00576
)
)
[BM1367 PD C 70] => Array
(
[ST00576] => stdClass Object
(
[transferfrom] => 102
[transferto] => 66
[BR_ID] => 102
[refno] =>
)
[OT01606] => stdClass Object
(
[transferfrom] => 102
[transferto] => 66
[BR_ID] => 66
[refno] => 102 - ST00576
)
)
[BM1367 PD C 85] => Array
(
[ST00576] => stdClass Object
(
[transferfrom] => 102
[transferto] => 66
[BR_ID] => 102
[refno] =>
)
[OT01606] => stdClass Object
(
[transferfrom] => 102
[transferto] => 66
[BR_ID] => 66
[refno] => 102 - ST00576
)
)
[BM1367 PD D 85] => Array
(
[ST00576] => stdClass Object
(
[transferfrom] => 102
[transferto] => 66
[BR_ID] => 102
[refno] =>
)
[OT01606] => stdClass Object
(
[transferfrom] => 102
[transferto] => 66
[BR_ID] => 66
[refno] => 102 - ST00576
)
)
)
我已經試過: 的foreach($轉移爲$ docno => $ transfer_details){ //做的東西在這裏 } $ previous_br =電流(array_map( 'pick_transferfrom',$傳輸)); \t} – redcoder