-
What will be the output of the following PHP code?
<?php
$flowre1 = array("001"=>"Daffodil", "002"=>"Dahlia", "003"=>"Daisy", "004"=>"Dianella", "005"=>"Delphinium");
$flowre2 = array("006"=>"Daffodil", "007"=>"Dahlia", "008"=>"Daisy");
$Res = array_diff($flowre1, $flowre2);
print_r($Res);
?>
-
-
Array
(
[004]
[005]
) -
Array
(
Dianella
Delphinium
) -
Array
(
[004] => Dianella
) -
Array
(
[004] => Dianella
[005] => Delphinium
) - None of these
-
Correct Option: D
The array_diff() function compares the values of two (or more) arrays, and returns the differences.