PHP array_diff not working

前端 未结 4 522
孤街浪徒
孤街浪徒 2021-01-04 12:56

I\'m trying to use array_diff like so. Here are my two array outputs:

List 1 Output

Array ([0] => 0022806 ) 

List 2 Output

4条回答
  •  日久生厌
    2021-01-04 13:42

    From the docs:

    Returns an array containing all the entries from array1 that are not present in any of the other arrays.

    If you only want to check whether they are the same, you can use $list1 == $list_2

提交回复
热议问题