how do I compare the current array value with previous array value.. Example if I have the following array and want to compare [BM1367 PD C 70][ST00576][‘transferfrom’] with previous array which is [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
)
)
)
You asked:
I think you may want to look at the following PHP functions
For example:
I was able to use those on a computation formula, work’s great! It is also useful when comparing current from previous or next array on yours.