A

Admin • 833.24K Points
Coach

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()
  • Correct Answer - Option(A)
  • Views: 23
  • Filed under category PHP
  • Hashtags:

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.

Be the first to start discuss.