Hello to all colleagues, hear the cry of the soul please. How to get the difference of two arrays trace type:
First array
Array ( [0] => Array ( [ID] => 21323154 [NAME] => Имя_2 [PREVIEW_TEXT] => Текст_2 ) )
Second array
Array ( [0] => Array ( [ID] => 543547564 [NAME] => Имя_1 [PREVIEW_TEXT] => Текст_1 ) [1] => Array ( [ID] => 222213322 [NAME] => Имя_2 [PREVIEW_TEXT] => Текст_2 ) [2] => Array ( [ID] => 333876833 [NAME] => Имя_3 [PREVIEW_TEXT] => Текст_3 ) )
How to cut the second element from the second array, the ID is different, can only be compared by NAME or PREVIEW_TEXT .
I used the array_diff_assoc function, I do not know how to add another difference search condition by key, well, logically, like this:
$ARR_result_Merge = array_diff_assoc($array_FIRST['NAME'], $array_SECOND['NAME']); // глупо конечно, но как сделать правильно?