Compare to values of two arrays in PHP

前端 未结 6 1370
南方客
南方客 2021-01-20 14:56

Hi i want to compare all the values of 2 arrays and end up with a true or false . I am using the code below and would of thought that the result would be false . but that is

6条回答
  •  深忆病人
    2021-01-20 15:21

    See http://php.net/manual/en/function.array-diff.php

    "Multiple occurrences in $array1 are all treated the same way."

    So, since all you have a zeros and ones, everything is "the same."

提交回复
热议问题