PHP Arrays
What will be the output of the following PHP code ?
$a1 = array("a" => "red", "b" => "green", "c" => "blue", "d" => "yellow");
$result = array_flip($a1);
print_r($result);

Array ( [a] => a [b] => b [c] => c [d] => d )
Array ( [red] => red [green] => green [blue] => blue [yellow] => yellow )
Array ( [red] => a [green] => b [blue] => c [yellow] => d )
Array ( [a] => red [b] => green [c] => blue [d] => yellow )

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$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);

Array ( [d] => yellow [h] => orange )
Array ( [i] => orange )
Array ( [h] => orange )
Array ( [d] => yellow )

ANSWER DOWNLOAD EXAMIANS APP