<?php $array =[ 0 => [ 0 => "AUA3H147", 1 => 2015, 2 => 'Audi' ], 1 => [ 0 => "AUA3H147", 1 => 2015, 2 => 'Ford' ], 2 => [ 0 => "AUA3H148", 1 => 2016, 2 => 'Chevy' ], 3 => [ 0 => "AUA3H148", 1 => 2017, 2 => 'Buick' ] ]; foreach ($array as $a) { $compositeKey = $a[0] . '_' . $a[1]; $result[$compositeKey] ??= $a; // only store if first occurrence of compositeKey } var_export(array_values($result)); // re-index and print
You have javascript disabled. You will not be able to edit any code.