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] => 1 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 2 [Cat] => 1 [Dog] => 1) Array ( [A] => 2 [Cat] => 2 [Dog] => 1 ) Array ( [A] => 2 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 1 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 2 [Cat] => 1 [Dog] => 1) Array ( [A] => 2 [Cat] => 2 [Dog] => 1 ) Array ( [A] => 2 [Cat] => 1 [Dog] => 2 ) 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; Sam is the brother of Bob and Bob) Error $brother Sam is the brother of Bob and Bob) $brother Sam is the brother of Bob and Bob) Error $brother Sam is the brother of Bob and Bob) $brother ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays Assume you would like to sort an array in ascending order by value while preserving key associations. Which of the following PHP sorting functions would you use? usort() ksort() asort() sort() krsort() usort() ksort() asort() sort() krsort() 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 ( [a] => red ) Array ( [e] => yellow ) Array ( [c] => blue ) Array ( [d] => yellow ) Array ( [a] => red ) Array ( [e] => yellow ) Array ( [c] => blue ) Array ( [d] => yellow ) 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_splice ($fruits, 2);print_r ($fruits); Error Array ( [0] => apple [1] => mango ) Array ( [0] => pear [1] => orange ) Array ( [0] => apple [1] => mango [2] => peach ) Error Array ( [0] => apple [1] => mango ) Array ( [0] => pear [1] => orange ) Array ( [0] => apple [1] => mango [2] => peach ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code ?$a = array("a" => "Jaguar", "b" => "Land Rover", "c" => "Audi", "d" => "Maseratti");echo array_search("Audi", $a); a d b c a d b c ANSWER DOWNLOAD EXAMIANS APP