There are two arrays:

###<pre>array(1) { [60]=> int(0) } ###array(4) { [19]=> string(31) "Акушер-гинеколог" [3]=> string(17) "Андролог " [4]=> string(24) "Анестезиолог" [60]=> string(22) "Бактериолог" } 

At the output you need to get an array:

  ###array(4) { [19]=> string(31) "Акушер-гинеколог" [3]=> string(17) "Андролог " [4]=> string(24) "Анестезиолог" } 

We need to get all the elements from the $arr array that are not in the $arr2

  • array_diff_assoc () seems to fit -
  • Does not fit - I need to look for the discrepancy. - Jony
  • Then write again in the question, what would you like to get in the end? - Ale_x

1 answer 1

 array_diff_key($array1, $array2) 
  • I tried it - it did not work. - Jony
  • one
    Change the arrays in some places - first large, then pass small to the function. - Ale_x