How to compare multidimensional associative arrays.
Some function like: http://www.php.net/manual/en/function.array-diff.php#98680
For example ArrayDiff should be the result of comparing Array1 and Array2. Showing elements with different value and new elements.
Array1
(
[0] => Array
(
[item] => 39.00
[time] => 0.00
)
[1] => Array
(
[item] => 49.00
)
[2] => Array
(
[time] => 0.00
[Value] => 0
)
[3] => Array
(
[item] => 49.00
[time] => 0.00
)
)
Array2
(
[0] => Array
(
[item] => 39.00
[time] => 10.00
)
[1] => Array
(
[item] => 49.00
)
[2] => Array
(
[time] => 0.00
[Value] => 0
)
[3] => Array
(
[item] => 49.00
[time] => 0.00
[Value] => 3
)
)
ArrayDiff
(
[0] => Array
(
[time] => 10.00
)
[3] => Array
(
[Value] => 3
)
)
This should get you most of the way there:
Maybe follow that with
array_filter($arrayDiff)if you want to get rid of the empty (equal) elements.