我有一个这样的数组:
[input] => Array (
[0] => Array ( [val1] => 111 [val2] => 222 [val3] => 333 [day] => 444 )
[1] => Array ( [val1] => 111 [val2] => 221 [val3] => 333 [day] => 444 )
[2] => Array ( [val1] => 111 [val2] => 223 [val3] => 333 [day] => 444 )
[3] => Array ( [val1] => 111 [val2] => 224 [val3] => 333 [day] => 444 )
[4] => Array ( [val1] => 111 [val2] => 222 [val3] => 333 [day] => 444 )
)
我只想检查数组中的前 2 个值(val1 和 val2)是否与另一个数组相同。就像上面例子中的 input[0] 和 input[4] 。我如何在 php 中执行此操作?
我不想删除重复的数组,我只是返回重复的值以供进一步使用。
谢谢