This is my array:
[0] => Array
(
[0] => SupSKU
[1] => MfrSKU
[2] => Cost
)
[1] => Array
(
[0] => A
[1] => 11742-4
[2] => 47.25
)
[2] => Array
(
[0] => B
[1] => 11742-4
[2] => 283.5
)
[3] => Array
(
[0] => C
[1] => 0904101
[2] => 995
)
I want to find duplicates values in Mfrsku value, in this example that is 11742-4, then compare their prices, and save bigger price SupSku value.
So my output will be
$final_output => Array (
[0] => B
)
I tried with this but this only retun empty array
array_unique(array_diff_assoc($ar,array_unique($ar)));