What will be the result of following code?
<?php
$a = array(1 => 0, 3 => 2, 4 => 6);
$b = array(3 => 1, 4 => 3, 6 => 4);

print_r(array_intersect($a, $b));
?>
Explanation
array_intersect() returns an array containing all the values of array1 that are present in all the arguments. In the code there is no elements with the same arguments (0,2,6 и 1,3,4).

Follow CodeGalaxy

Mobile Beta

Get it on Google Play
Send Feedback