Home / Programming MCQs / PHP MCQs / Question

P

Pritvik • 5.02K Points
Tutor III

Q. What is the result of the following PHP code?

Code:
<?php
    $arr1 = array("A"=>"Alex", "B"=>"Bob", "E"=>"Emily");
    $arr2 = array("L"=>"Alex", "O"=>"Bob");
    
    $result = array_intersect($arr1, $arr2);
    print_r($result);
?>
(A) Array([A] => Alex, [B] => Bob)
(B) Array([L] => Alex, [O] => Bob)
(C) Array([E] => Emily)
(D) Array()

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.