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 Only 1 2 and 3 2, 3 and 4 3 and 4 Only 1 2 and 3 2, 3 and 4 ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays There are three different kind of arrays: Numeric array, Associative array, Multidimensional array Const array, Associative array, Multidimensional array Numeric array, String array, Multidimensional array Numeric array, Associative array, Dimensional array Numeric array, Associative array, Multidimensional array Const array, Associative array, Multidimensional array Numeric array, String array, Multidimensional array Numeric array, Associative array, Dimensional array ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$number = array ("4", "hello", 2);echo (array_sum ($number)); 2 6 4 4hello2 2 6 4 4hello2 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");$result = array_flip($a1);print_r($result); Array ( [a] => a [b] => b [c] => c [d] => d ) Array ( [a] => red [b] => green [c] => blue [d] => yellow ) Array ( [red] => a [green] => b [blue] => c [yellow] => d ) Array ( [red] => red [green] => green [blue] => blue [yellow] => yellow ) Array ( [a] => a [b] => b [c] => c [d] => d ) Array ( [a] => red [b] => green [c] => blue [d] => yellow ) Array ( [red] => a [green] => b [blue] => c [yellow] => d ) Array ( [red] => red [green] => green [blue] => blue [yellow] => yellow ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays Which function returns an array consisting of associative key/value pairs? array_count() array_count_values() count() count_values() array_count() array_count_values() count() count_values() ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What elements will the following script output?$array = array (true => 'a', 1 => 'b');var_dump ($array); 1 => 'b' It will output NULL True => 'a', 1 => 'b' None 1 => 'b' It will output NULL True => 'a', 1 => 'b' None ANSWER DOWNLOAD EXAMIANS APP