Skip to content
Advertisement

Tag: array-difference

array_diff() function not showing correct result

array_diff() function not showing correct result:- First Array:- Second array:- Output: designation id column not showing in output result. if designation-id value is 1 then this index not showing in output otherwise it showing. is it bug or something else? Answer Since your arrays are associative arrays, so you need to use array_diff_assoc:- Output:- https://3v4l.org/NKbuX To check more descriptions and

Advertisement