PHP Arrays Which function returns an array consisting of associative key/value pairs? array_count_values() array_count() count() count_values() array_count_values() array_count() count() count_values() 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] => red [1] => green) Array ( [0] => blue [1] => yellow [2] => red [3] => green ) Array ( [0] => red [1] => green [2] => blue [3] => yellow ) Array ( [0] => blue [1] => yellow ) Array ( [0] => red [1] => green) Array ( [0] => blue [1] => yellow [2] => red [3] => 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?$a = array("A", "Cat", "Dog", "A", "Dog");print_r(array_count_values($a)); Array ( [A] => 2 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 2 [Cat] => 2 [Dog] => 1 ) Array ( [A] => 1 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 2 [Cat] => 1 [Dog] => 1) Array ( [A] => 2 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 2 [Cat] => 2 [Dog] => 1 ) Array ( [A] => 1 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 2 [Cat] => 1 [Dog] => 1) 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”); 3 and 4 2, 3 and 4 Only 1 2 and 3 3 and 4 2, 3 and 4 Only 1 2 and 3 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] => apple [1] => mango [2] => peach ) Array ( [0] => peach [1] => pear [2] => orange ) Array ( [0] => peach ) Array ( [0] => apple [1] => mango ) Array ( [0] => apple [1] => mango [2] => peach ) Array ( [0] => peach [1] => pear [2] => orange ) Array ( [0] => peach ) Array ( [0] => apple [1] => mango ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$cars = array("Volvo", "BMW", "Toyota");echo "I like " . $cars[2] . ", " . $cars[1] . " and " . $cars[0] . "."; I like Volvo, Toyota and BMW I like Volvo, BMW and Toyota I like Toyota, BMW and Volvo I like BMW, Volvo and Toyota I like Volvo, Toyota and BMW I like Volvo, BMW and Toyota I like Toyota, BMW and Volvo I like BMW, Volvo and Toyota ANSWER DOWNLOAD EXAMIANS APP