I have an Array which has 3 Dimensions:
$data_ary[$k_0][$v_0[4]]['...'] = ...
In the brackets with '...' I write Parameters like "Country", "Designation", "Year" and so on. Now as I run this through a loop the values for $k_0 increases every loop by 1 and $v_0[4] always changes the specific value.
My Problem: Very often the values are duplicates across the different dimensions. For Example:
$data_ary[1][1]['Country'] = 'Germany';
$data_ary[1][1]['Year'] = '2017';
$data_ary[2][1]['Country'] = 'Germany';
$data_ary[2][1]['Year'] = '2017';
How do I delete those duplicates? I have tried array_unique() but the result was that from the 27.000 entries 26999 got deleted..
Some Example Input:
$data_ary[6]['GERMANY']['YEAR'] = 2017;
$data_ary[6]['GERMANY']['MONTH'] = 1;
$data_ary[6]['GERMANY']['ID'] = 6010;
$data_ary[6]['GERMANY']['COUNTRY'] = 'GERMANY';
$data_ary[7]['ITALY']['YEAR'] = 2016;
$data_ary[7]['ITALY']['MONTH'] = 4;
$data_ary[7]['ITALY']['ID'] = 52752;
$data_ary[7]['ITALY']['COUNTRY'] = 'ITALY';
$data_ary[8]['GERMANY']['YEAR'] = 2017;
$data_ary[8]['GERMANY']['MONTH'] = 1;
$data_ary[8]['GERMANY']['ID'] = 6010;
$data_ary[8]['GERMANY']['COUNTRY'] = 'GERMANY';
As you can See the first and the second are basically the same but differ by the value in the first bracktes.