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 ( [e] => red [f] => green [g] => blue ) Array ( [a] => red [b] => green [c] => blue ) Array ( [a] => red [b] => green [c] => blue [d] => yellow ) Array ( [a] => red [b] => green [c] => blue [d] => yellow [e] => red [f] => green [g] => blue ) Array ( [e] => red [f] => green [g] => blue ) Array ( [a] => red [b] => green [c] => blue ) Array ( [a] => red [b] => green [c] => blue [d] => yellow ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will the following script output?$array = array (1, 2, 3, 5, 8, 13, 21, 34, 55);$sum = 0;for ($i = 0; $i < 5; $i++) {$sum += $array[$array[$i]];}echo $sum; 19 NULL 5 78 19 NULL 5 78 ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$a1 = array("red", "green");$a2 = array("blue", "yellow");print_r(array_merge($a1, $a2)); Array ( [0] => red [1] => green [2] => blue [3] => yellow ) Array ( [0] => blue [1] => yellow ) Array ( [0] => blue [1] => yellow [2] => red [3] => green ) Array ( [0] => red [1] => green) Array ( [0] => red [1] => green [2] => blue [3] => yellow ) Array ( [0] => blue [1] => yellow ) Array ( [0] => blue [1] => yellow [2] => red [3] => green ) Array ( [0] => red [1] => green) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$cars = array("Volvo", "BMW", "Toyota", "Honda", "Mercedes", "Opel");print_r(array_chunk($cars, 2)); Array ( [0] => Array ( [0] => Volvo [1] => Volvo ) [1] => Array ( [0] => BMW [1] => BMW ) [2] => Array ( [0] => Toyota [1] => Toyota ) ) Array ( [0] => Array ( [1] => Volvo [2] => BMW ) [1] => Array ( [1] => Toyota [2] => Honda ) [2] => Array ( [1] => Mercedes [2] => Opel ) ) Array ( [0] => Array ( [0] => Volvo [1] => BMW ) [1] => Array ( [0] => Toyota [1] => Honda ) [2] => Array ( [0] => Mercedes [1] => Opel ) ) Array ( [1] => Array ( [1] => Volvo [2] => BMW ) [2] => Array ( [1] => Toyota [2] => Honda ) [3] => Array ( [1] => Mercedes [2] => Opel ) ) Array ( [0] => Array ( [0] => Volvo [1] => Volvo ) [1] => Array ( [0] => BMW [1] => BMW ) [2] => Array ( [0] => Toyota [1] => Toyota ) ) Array ( [0] => Array ( [1] => Volvo [2] => BMW ) [1] => Array ( [1] => Toyota [2] => Honda ) [2] => Array ( [1] => Mercedes [2] => Opel ) ) Array ( [0] => Array ( [0] => Volvo [1] => BMW ) [1] => Array ( [0] => Toyota [1] => Honda ) [2] => Array ( [0] => Mercedes [1] => Opel ) ) Array ( [1] => Array ( [1] => Volvo [2] => BMW ) [2] => Array ( [1] => Toyota [2] => Honda ) [3] => Array ( [1] => Mercedes [2] => Opel ) ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$place = array("NYC", "LA", "Paris");array_pop($place);$place1 = array("Paris");$place = array_merge($place, $place1);print_r($place); Array ( [0] => NYC [1] => LA [2] => Paris) None of the mentioned Array ( [0] => LA [1] => Paris [2] => Paris ) Array ( [0] => NYC [1] => LA [2] => Paris [3] => Paris ) Array ( [0] => NYC [1] => LA [2] => Paris) None of the mentioned Array ( [0] => LA [1] => Paris [2] => Paris ) Array ( [0] => NYC [1] => LA [2] => Paris [3] => Paris ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays Which function will return true if a variable is an array or false if it is not? is_array() in_array() this_array() do_array() is_array() in_array() this_array() do_array() ANSWER DOWNLOAD EXAMIANS APP