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 ( [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 ) Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 ) Array ( 35 37 43 ) Array ( Peter Ben Joe ) 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 ( [d] => yellow ) Array ( [e] => yellow ) Array ( [a] => red ) Array ( [c] => blue ) Array ( [d] => yellow ) Array ( [e] => yellow ) Array ( [a] => red ) Array ( [c] => blue ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays Which of the following are correct ways of creating an array?1. state[0] = “karnataka”;2. $state[] = array(“karnataka”);3. $state[0] = “karnataka”;4. $state = array(“karnataka”); 2, 3 and 4 Only 1 2 and 3 3 and 4 2, 3 and 4 Only 1 2 and 3 3 and 4 ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$state = array ("Karnataka", "Goa", "Tamil Nadu", "Andhra Pradesh");echo (array_search ("Tamil Nadu", $state) ); 2 1 False True 2 1 False True ANSWER DOWNLOAD EXAMIANS APP
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; Error $brother Sam is the brother of Bob and Bob) Sam is the brother of Bob and Bob) $brother Error $brother Sam is the brother of Bob and Bob) Sam is the brother of Bob and Bob) $brother 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]); error mango peach 0 error mango peach 0 ANSWER DOWNLOAD EXAMIANS APP