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 ( [c] => blue ) Array ( [e] => yellow ) Array ( [a] => red ) Array ( [d] => yellow ) Array ( [c] => blue ) Array ( [e] => yellow ) Array ( [a] => red ) Array ( [d] => yellow ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What functions count elements in an array?1. count2. Sizeof3. Array_Count4. Count_array Option 3 and 4 Option 1 and 4 Option 2 and 4 Option 1 and 2 Option 3 and 4 Option 1 and 4 Option 2 and 4 Option 1 and 2 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”); Only 1 2 and 3 2, 3 and 4 3 and 4 Only 1 2 and 3 2, 3 and 4 3 and 4 ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code ?$a = array(12, 5, 2);echo(array_product($a)); 060 010 120 024 060 010 120 024 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() sort() asort() krsort() ksort() usort() sort() asort() krsort() ksort() ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What array will you get if you convert an object to an array? An array with keys of that object as the array's elements An array with properties of that object as the array's elements An array with properties of that array as the object's elements An array with properties of that object as the Key elements An array with keys of that object as the array's elements An array with properties of that object as the array's elements An array with properties of that array as the object's elements An array with properties of that object as the Key elements ANSWER DOWNLOAD EXAMIANS APP