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 peach 0 mango error peach 0 mango 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($fname, $age);print_r($c); Array ( “[Peter] => 35” “[Ben] => 37” “[Joe] => 43” ) Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 ) Array ( 35 37 43 ) Array ( Peter Ben Joe ) Array ( “[Peter] => 35” “[Ben] => 37” “[Joe] => 43” ) 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?$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 ( Peter Ben Joe ) Array ( [35] => Peter [37] => Ben [43] => Joe ) Array ( 35 37 43 ) Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 ) Array ( Peter Ben Joe ) Array ( [35] => Peter [37] => Ben [43] => Joe ) Array ( 35 37 43 ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$a = array("red", "green", "blue");array_pop($a);print_r($a); Array ( [0] => red [1] => green ) Array ( [0] => red [1] => blue ) Array ( [0] => green [1] => blue ) Array ( [0] => blue [1] => blue ) Array ( [0] => red [1] => green ) Array ( [0] => red [1] => blue ) Array ( [0] => green [1] => blue ) Array ( [0] => blue [1] => blue ) 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 ( [c] => blue ) Array ( [a] => red ) Array ( [d] => yellow ) Array ( [e] => yellow ) Array ( [c] => blue ) Array ( [a] => red ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$fruits = array ("apple", "mango", "peach", "pear", "orange");$subset = array_slice ($fruits, 2);print_r ($subset); Array ( [0] => peach ) Array ( [0] => apple [1] => mango [2] => peach ) Array ( [0] => peach [1] => pear [2] => orange ) Array ( [0] => apple [1] => mango ) Array ( [0] => peach ) Array ( [0] => apple [1] => mango [2] => peach ) Array ( [0] => peach [1] => pear [2] => orange ) Array ( [0] => apple [1] => mango ) ANSWER DOWNLOAD EXAMIANS APP