You can simply use $a == $bit if the order doesn't matter, or $a === $bif the order matters.
For instance:
$a = array(
'1' => 12,
'3' => 14,
'6' => 11
);
$b = array(
'1' => 12,
'3' => 14,
'6' => 11
);
$c = array(
'3' => 14,
'1' => 12,
'6' => 11
);
$d = array(
'1' => 11,
'3' => 14,
'6' => 11
);
$a == $b;
$a === $b;
$a == $c;
$a === $c;
$a == $d;
$a === $d;
source
share