Array comparison problem

Hi

i am trying to compare to arrays

$a = Array ( [q1] => no [q3] => yes [q2] => yes );

$b = Array ( [q1] => no [q3] => yes [q2] => yes );

But when i intersect them it results in one element only, dont know why???

$c = array_intersect($a,$b);

print_r($c);

output -

Array ( [q1] => no )

Because you have not separated each key=>value with a comma.

<?php
$a = Array ('q1' => 'no', 'q3' => 'yes', 'q2' => 'yes');

$b = Array ('q1' => 'no', 'q3' => 'yes', 'q2' => 'yes');

$c = array_intersect($a,$b);

print_r($c);
?>