Input: 2D array
[ [2,3,4,5], [3,2,4,5], [2,3,8,5], [6,1,23,5], [2,1,23,5], [6,8,2,2] ] We need to find arrays with the same first elements (in this case c (2))
[2,3,4,5] [2,1,23,5] [2,3,8,5] [6,1,23,5] [6,8,2,2] And write them in a separate array. Problem: how to find a match, so that the search for a match would not give duplicates. In this case, I find a match with 3 and 6 for the first array, then I find it with 1 and 6 for 3, and so, if we allow more arrays, or more ( not with (2) as in the example) more matches
array_column? yes you can ...... or are you still about something? - Alexey Shimansky