PHP Arrays What will be the output of the following PHP code?$state = array ("Karnataka", "Goa", "Tamil Nadu", "Andhra Pradesh");echo (array_search ("Tamil Nadu", $state) ); 1 2 False True 1 2 False True 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; Error Sam is the brother of Bob and Bob) $brother Sam is the brother of Bob and Bob) $brother Error Sam is the brother of Bob and Bob) $brother Sam is the brother of Bob and Bob) $brother 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 ( [d] => yellow ) Array ( [c] => blue ) Array ( [e] => yellow ) Array ( [a] => red ) Array ( [d] => yellow ) Array ( [c] => blue ) Array ( [e] => yellow ) Array ( [a] => red ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$face = array ("A", "J", "Q", "K");$number = array ("2","3","4", "5", "6", "7", "8", "9", "10");$cards = array_merge ($face, $number);print_r ($cards); Array ( [0] => A [1] => J [2] => Q [3] => K [4] => 2 [5] => 3 [6] => 4 [7] => 5 [8] => 6 [9] => 7 [10] => 8 [11] => 9 [12] => 10 ) Error Array ( [0] => 2 [1] => 3 [2] => 4 [3] => 5 [4] => 6 [5] => 7 [6] => 8 [7] => 9 [8] => 10 [9] => A [10] => J [11] => Q [12] => K ) Array ( [0] => A [1] => 2 [2] => J [3] => 3 [4] => Q [5] => 4 [6] => K [7] => 5 [8] => 6 [9] => 7 [10] => 8 [11] => 9 [12] => 10 ) Array ( [0] => A [1] => J [2] => Q [3] => K [4] => 2 [5] => 3 [6] => 4 [7] => 5 [8] => 6 [9] => 7 [10] => 8 [11] => 9 [12] => 10 ) Error Array ( [0] => 2 [1] => 3 [2] => 4 [3] => 5 [4] => 6 [5] => 7 [6] => 8 [7] => 9 [8] => 10 [9] => A [10] => J [11] => Q [12] => K ) Array ( [0] => A [1] => 2 [2] => J [3] => 3 [4] => Q [5] => 4 [6] => K [7] => 5 [8] => 6 [9] => 7 [10] => 8 [11] => 9 [12] => 10 ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$array1 = array ("KA", "LA", "CA", "MA", "TA");$array2 = array ("KA", "IA", "CA", "GA", "TA");$inter = array_intersect ($array1, $array2);print_r ($inter); Array ( [0] => KA [1] => LA [2] => CA [3] => MA [4] => TA [5] => IA [6] => GA ) Array ( [1] => LA [3] => MA ) Array ( [0] => KA [2] => CA [4] => TA ) Array ( [1] => IA [3] => GA ) Array ( [0] => KA [1] => LA [2] => CA [3] => MA [4] => TA [5] => IA [6] => GA ) Array ( [1] => LA [3] => MA ) Array ( [0] => KA [2] => CA [4] => TA ) Array ( [1] => IA [3] => GA ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays Array values are keyed by ______ values (called indexed arrays) or using ______ values (called associative arrays). Of course, these key methods can be combined as well. Integer, string Float, string String, Boolean Positive number, negative number Even number, string Integer, string Float, string String, Boolean Positive number, negative number Even number, string ANSWER DOWNLOAD EXAMIANS APP