PHP Arrays What will be the output of the following PHP code?$names = array("Sam", "Bob", "Jack");echo $names[0] . "is the brother of " . $names[1] . " and " . $names[1] . ".".$brother; Sam is the brother of Bob and Bob) $brother Sam is the brother of Bob and Bob) $brother Error Sam is the brother of Bob and Bob) $brother Sam is the brother of Bob and Bob) $brother Error 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] => 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) Array ( [0] => red [1] => green [2] => blue [3] => yellow ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$face = array ("A", "J", "Q", "K");$number = array ("2","3","4", "5", "6", "7", "8", "9", "10");$cards = array_merge ($face, $number);print_r ($cards); Array ( [0] => A [1] => J [2] => Q [3] => K [4] => 2 [5] => 3 [6] => 4 [7] => 5 [8] => 6 [9] => 7 [10] => 8 [11] => 9 [12] => 10 ) Array ( [0] => 2 [1] => 3 [2] => 4 [3] => 5 [4] => 6 [5] => 7 [6] => 8 [7] => 9 [8] => 10 [9] => A [10] => J [11] => Q [12] => K ) Array ( [0] => A [1] => 2 [2] => J [3] => 3 [4] => Q [5] => 4 [6] => K [7] => 5 [8] => 6 [9] => 7 [10] => 8 [11] => 9 [12] => 10 ) Error Array ( [0] => A [1] => J [2] => Q [3] => K [4] => 2 [5] => 3 [6] => 4 [7] => 5 [8] => 6 [9] => 7 [10] => 8 [11] => 9 [12] => 10 ) Array ( [0] => 2 [1] => 3 [2] => 4 [3] => 5 [4] => 6 [5] => 7 [6] => 8 [7] => 9 [8] => 10 [9] => A [10] => J [11] => Q [12] => K ) Array ( [0] => A [1] => 2 [2] => J [3] => 3 [4] => Q [5] => 4 [6] => K [7] => 5 [8] => 6 [9] => 7 [10] => 8 [11] => 9 [12] => 10 ) Error 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_diff($a1, $a2);print_r($result); Array ( [e] => yellow ) Array ( [c] => blue ) Array ( [a] => red ) Array ( [d] => yellow ) Array ( [e] => yellow ) Array ( [c] => blue ) Array ( [a] => red ) Array ( [d] => yellow ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$fname = array("Peter", "Ben", "Joe");$age = array("35", "37", "43");$c = array_combine($age, $fname);print_r($c); Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 ) Array ( 35 37 43 ) Array ( Peter Ben Joe ) Array ( [35] => Peter [37] => Ben [43] => Joe ) Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 ) Array ( 35 37 43 ) Array ( Peter Ben Joe ) Array ( [35] => Peter [37] => Ben [43] => Joe ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code ?$people = array("Peter", "Susan", "Edmund", "Lucy");echo pos($people); Peter Lucy Edmund Susan Peter Lucy Edmund Susan ANSWER DOWNLOAD EXAMIANS APP