как удалить одинаковые элементы по определенным ключам, например по ['email'] и [phone], если email и phone равны удалить запись в обоих массивах вне зависимости от содержания остальных элементов.
первый массив
array(15) {
[0]=>
array(7) {
["email"]=>
string(9) "dawwadwad"
["phone"]=>
string(0) ""
["master_id"]=>
int(4)
["name"]=>
string(0) ""
["company"]=>
string(9) "wadadwawd"
["post"]=>
string(9) "wadadwwad"
["base_name"]=>
string(16) "test_base_name_1"
}
[1]=>
array(7) {
["email"]=>
string(16) "[email protected]"
["phone"]=>
string(0) ""
["master_id"]=>
int(2)
["name"]=>
string(6) "awdwad"
["company"]=>
string(6) "awdwad"
["post"]=>
string(0) ""
["base_name"]=>
string(16) "test_base_name_1"
}
[2]=>
array(7) {
["email"]=>
string(13) "[email protected]"
["phone"]=>
string(0) ""
["master_id"]=>
int(5)
["name"]=>
string(6) "awdawd"
["company"]=>
string(6) "awdwad"
["post"]=>
string(0) ""
["base_name"]=>
string(16) "test_base_name_1"
}
[3]=>
array(7) {
["email"]=>
string(22) "[email protected]"
["phone"]=>
string(9) "awdwadwda"
["master_id"]=>
int(8)
["name"]=>
string(12) "awdawdawdwad"
["company"]=>
string(6) "awdwad"
["post"]=>
string(0) ""
["base_name"]=>
string(16) "test_base_name_1"
}
[4]=>
array(7) {
["email"]=>
string(11) "[email protected]"
["phone"]=>
string(12) "+77764086666"
["master_id"]=>
int(1)
["name"]=>
string(3) "max"
["company"]=>
string(2) "CS"
["post"]=>
string(0) ""
["base_name"]=>
string(16) "test_base_name_1"
}
[5]=>
array(7) {
["email"]=>
string(13) "[email protected]"
["phone"]=>
string(12) "+77777777777"
["master_id"]=>
int(2)
["name"]=>
string(8) "Жека"
["company"]=>
string(9) "123вфы"
["post"]=>
string(0) ""
["base_name"]=>
string(16) "test_base_name_1"
}
[6]=>
array(7) {
["email"]=>
string(13) "[email protected]"
["phone"]=>
string(12) "+77778888888"
["master_id"]=>
int(2)
["name"]=>
string(8) "Макс"
["company"]=>
string(8) "Груз"
["post"]=>
string(0) ""
["base_name"]=>
string(16) "test_base_name_2"
}
[7]=>
array(7) {
["email"]=>
string(16) "[email protected]"
["phone"]=>
string(9) "awdwadwda"
["master_id"]=>
int(2)
["name"]=>
string(6) "awdwad"
["company"]=>
string(6) "awdwad"
["post"]=>
string(0) ""
["base_name"]=>
string(16) "test_base_name_1"
}
[8]=>
array(7) {
["email"]=>
string(13) "[email protected]"
["phone"]=>
string(9) "awdwadwda"
["master_id"]=>
int(5)
["name"]=>
string(6) "awdawd"
["company"]=>
string(6) "awdwad"
["post"]=>
string(0) ""
["base_name"]=>
string(16) "test_base_name_1"
}
[9]=>
array(7) {
["email"]=>
string(22) "[email protected]"
["phone"]=>
string(12) "+77764086666"
["master_id"]=>
int(7)
["name"]=>
string(22) "lyubitelev maxim"
["company"]=>
string(3) "spc"
["post"]=>
string(8) "director"
["base_name"]=>
string(16) "test_base_name_2"
}
[10]=>
array(7) {
["email"]=>
string(12) "[email protected]"
["phone"]=>
string(11) "89039000000"
["master_id"]=>
int(5001)
["name"]=>
string(27) "Иванов Петр"
["company"]=>
string(14) "Тэглайн"
["post"]=>
string(14) "Уборщик"
["base_name"]=>
string(16) "test_base_name_2"
}
[11]=>
array(7) {
["email"]=>
string(0) ""
["phone"]=>
string(10) "9059525482"
["master_id"]=>
NULL
["name"]=>
string(0) ""
["company"]=>
string(0) ""
["post"]=>
string(0) ""
["base_name"]=>
string(16) "test_base_name_2"
}
[12]=>
array(7) {
["email"]=>
string(13) "[email protected]"
["phone"]=>
string(0) ""
["master_id"]=>
NULL
["name"]=>
string(0) ""
["company"]=>
string(0) ""
["post"]=>
string(0) ""
["base_name"]=>
string(16) "test_base_name_2"
}
[13]=>
array(7) {
["email"]=>
string(11) "[email protected]"
["phone"]=>
string(12) "+77764086666"
["master_id"]=>
int(1)
["name"]=>
string(3) "max"
["company"]=>
string(3) "spc"
["post"]=>
string(0) ""
["base_name"]=>
string(16) "test_base_name_2"
}
[14]=>
array(7) {
["email"]=>
string(13) "[email protected]"
["phone"]=>
string(12) "+77777777777"
["master_id"]=>
int(2)
["name"]=>
string(8) "Жека"
["company"]=>
string(8) "Груз"
["post"]=>
string(0) ""
["base_name"]=>
string(16) "test_base_name_2"
}
}
второй массив
array(4) {
[0]=>
array(7) {
["email"]=>
string(0) ""
["phone"]=>
string(10) "9059525482"
["master_id"]=>
NULL
["name"]=>
string(0) ""
["company"]=>
string(0) ""
["post"]=>
string(0) ""
["base_name"]=>
string(16) "test_base_name_2"
}
[1]=>
array(7) {
["email"]=>
string(13) "[email protected]"
["phone"]=>
string(12) "+77777777777"
["master_id"]=>
int(2)
["name"]=>
string(8) "Жека"
["company"]=>
string(8) "Груз"
["post"]=>
string(0) ""
["base_name"]=>
string(16) "test_base_name_2"
}
[2]=>
array(7) {
["email"]=>
string(13) "[email protected]"
["phone"]=>
string(12) "+77778888888"
["master_id"]=>
int(2)
["name"]=>
string(8) "Макс"
["company"]=>
string(8) "Груз"
["post"]=>
string(0) ""
["base_name"]=>
string(16) "test_base_name_2"
}
[3]=>
array(7) {
["email"]=>
string(11) "[email protected]"
["phone"]=>
string(12) "+77764086666"
["master_id"]=>
int(1)
["name"]=>
string(3) "max"
["company"]=>
string(3) "spc"
["post"]=>
string(0) ""
["base_name"]=>
string(16) "test_base_name_2"
}
}