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 ) 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 ) Array ( [a] => red [b] => green [c] => blue [d] => yellow [e] => red [f] => green [g] => blue ) Array ( [a] => red [b] => green [c] => blue ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following php code?$states = array("karnataka" => array( "population" => "11,35,000", "captial" => "Bangalore"),"Tamil Nadu" => array( "population" => "17,90,000","captial" => "Chennai") );echo $states["karnataka"]["population"]; population 11,35,000 11,35,000 karnataka population karnataka 11,35,000 population 11,35,000 11,35,000 karnataka population karnataka 11,35,000 ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code ?$array = array("red", "green");array_push($array, "blue", "yellow");print_r($array); Array ( [0] => red [1] => green [2] => blue [3] => yellow ) Array ( [0] => red [1] => green ) Array ( [0] => blue [1] => yellow [2] => red [3] => green ) Array ( [0] => blue [1] => yellow ) Array ( [0] => red [1] => green [2] => blue [3] => yellow ) Array ( [0] => red [1] => green ) Array ( [0] => blue [1] => yellow [2] => red [3] => green ) Array ( [0] => blue [1] => yellow ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$a = array("A", "Cat", "Dog", "A", "Dog");print_r(array_count_values($a)); Array ( [A] => 2 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 2 [Cat] => 1 [Dog] => 1) Array ( [A] => 1 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 2 [Cat] => 2 [Dog] => 1 ) Array ( [A] => 2 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 2 [Cat] => 1 [Dog] => 1) Array ( [A] => 1 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 2 [Cat] => 2 [Dog] => 1 ) 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] => green [1] => blue ) Array ( [0] => red [1] => blue ) Array ( [0] => red [1] => green ) Array ( [0] => blue [1] => blue ) Array ( [0] => green [1] => blue ) Array ( [0] => red [1] => blue ) Array ( [0] => red [1] => green ) Array ( [0] => blue [1] => blue ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What elements will the following script output?$array = array (true => 'a', 1 => 'b');var_dump ($array); True => 'a', 1 => 'b' None 1 => 'b' It will output NULL True => 'a', 1 => 'b' None 1 => 'b' It will output NULL ANSWER DOWNLOAD EXAMIANS APP