I have data in text file separate by colon like
3306250027:JOHN:Male:Manager
3306250028:JOHN:Male:Manager
3306250029:JOHN:Male:Employee
I want to use line 1 and ignore line 2 that have column 2 and 4 duplicated and do nothing with line 3. The out put that I want
3306250027:JOHN:Male:Manager
3306250029:JOHN:Male:Employee
I try to use array_unique() but I don't know what to do, some from my code
$lines = file('file.txt');
$result = array_unique($lines, SORT_REGULAR);