PHP Arrays What functions count elements in an array?1. count2. Sizeof3. Array_Count4. Count_array Option 1 and 2 Option 2 and 4 Option 3 and 4 Option 1 and 4 Option 1 and 2 Option 2 and 4 Option 3 and 4 Option 1 and 4 ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will the following script output?$array = array (1, 2, 3, 5, 8, 13, 21, 34, 55);$sum = 0;for ($i = 0; $i < 5; $i++) {$sum += $array[$array[$i]];}echo $sum; 19 78 NULL 5 19 78 NULL 5 ANSWER DOWNLOAD EXAMIANS APP
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) ); True 1 2 False True 1 2 False 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 ( [1] => IA [3] => GA ) Array ( [0] => KA [2] => CA [4] => TA ) Array ( [0] => KA [1] => LA [2] => CA [3] => MA [4] => TA [5] => IA [6] => GA ) Array ( [1] => LA [3] => MA ) Array ( [1] => IA [3] => GA ) Array ( [0] => KA [2] => CA [4] => TA ) Array ( [0] => KA [1] => LA [2] => CA [3] => MA [4] => TA [5] => IA [6] => GA ) Array ( [1] => LA [3] => MA ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code ?$people = array("Peter", "Susan", "Edmund", "Lucy");echo pos($people); Edmund Susan Peter Lucy Edmund Susan Peter Lucy 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 3 and 4 2, 3 and 4 Only 1 2 and 3 3 and 4 2, 3 and 4 ANSWER DOWNLOAD EXAMIANS APP