<?php $b = ['1' => 1, 'z' => 1]; $a = ['x' => 1, 'z' => 2]; if (count(array_diff(array_merge($a, $b), array_intersect($a, $b))) === 0) { echo 'the same'; } else { echo 'not the same'; }
You have javascript disabled. You will not be able to edit any code.