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 ) Array ( [i] => orange ) Array ( [h] => orange ) Array ( [d] => yellow [h] => orange ) Array ( [d] => yellow ) Array ( [i] => orange ) Array ( [h] => orange ) Array ( [d] => yellow [h] => orange ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays Assume you would like to sort an array in ascending order by value while preserving key associations. Which of the following PHP sorting functions would you use? sort() krsort() ksort() asort() usort() sort() krsort() ksort() asort() usort() ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$fruits = array ("mango", "apple", "pear", "peach");$fruits = array_flip($fruits);echo ($fruits[0]); 0 error mango peach 0 error mango peach ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code ?$number = range(0, 5);print_r ($number); Array ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 ) Array ( [0] => 0 [5] => 5 ) Array ( [0] => 0 [1] => 0 [2] => 0 [3] => 0 [4] => 0 [5] => 0 ) Array ( [0] => 5 [1] => 5 [2] => 5 [3] => 5 [4] => 5 [5] => 5 ) Array ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 ) Array ( [0] => 0 [5] => 5 ) Array ( [0] => 0 [1] => 0 [2] => 0 [3] => 0 [4] => 0 [5] => 0 ) Array ( [0] => 5 [1] => 5 [2] => 5 [3] => 5 [4] => 5 [5] => 5 ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays Which in-built function will add a value to the end of an array? array_unshift() into_array() array_push() inend_array() array_unshift() into_array() array_push() inend_array() 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");$result = array_intersect($a1, $a2);print_r($result); Array ( [a] => red [b] => green [c] => blue [d] => yellow [e] => red [f] => green [g] => blue ) Array ( [a] => red [b] => green [c] => blue ) Array ( [a] => red [b] => green [c] => blue [d] => yellow ) Array ( [e] => red [f] => green [g] => blue ) Array ( [a] => red [b] => green [c] => blue [d] => yellow [e] => red [f] => green [g] => blue ) Array ( [a] => red [b] => green [c] => blue ) Array ( [a] => red [b] => green [c] => blue [d] => yellow ) Array ( [e] => red [f] => green [g] => blue ) ANSWER DOWNLOAD EXAMIANS APP