Q:

What will be the output of the following PHP code?

0

What will be the output of the following PHP code?

<?php
$a1 = array("a" => "red", "b" => "green", "c" => "blue", "d" => "yellow");
$a2 = array("e" => "red", "f" => "green", "g" => "blue", "h" => "orange");
$a3 = array("i" => "orange");
$a4 = array_combine($a2, $a3);
$result = array_diff($a4, $a2);
print_r($result);
?>

  1. Array ( [d] => yellow )
  2. Array ( [i] => orange )
  3. Array ( [h] => orange )
  4. Array ( [d] => yellow [h] => orange )

All Answers

need an explanation for this answer? contact us directly to get an explanation for this answer

 (a).Array ( [d] => yellow )

need an explanation for this answer? contact us directly to get an explanation for this answer

total answers (1)

This question belongs to these collections

Similar questions


need a help?


find thousands of online teachers now