PHP Arrays What will be the output of the following PHP code ?$people = array("Peter", "Susan", "Edmund", "Lucy");echo pos($people); Lucy Edmund Susan Peter Lucy Edmund Susan Peter 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”); 2, 3 and 4 Only 1 2 and 3 3 and 4 2, 3 and 4 Only 1 2 and 3 3 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; 78 19 NULL 5 78 19 NULL 5 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; $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) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$fruits = array ("mango", "apple", "peach", "pear");$fruits = asort ($fruits);printr ($fruits); Array ( [1] => apple [0] => mango [2] => peach [3] => pear ) Array ( [1] => apple [0] => mango [3] => peach [2] => pear ) Array ( [0] => apple [1] => mango [2] => peach [3] => pear ) Error Array ( [1] => apple [0] => mango [2] => peach [3] => pear ) Array ( [1] => apple [0] => mango [3] => peach [2] => pear ) Array ( [0] => apple [1] => mango [2] => peach [3] => pear ) Error ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$place = array("NYC", "LA", "Paris");array_pop($place);$place1 = array("Paris");$place = array_merge($place, $place1);print_r($place); Array ( [0] => LA [1] => Paris [2] => Paris ) None of the mentioned Array ( [0] => NYC [1] => LA [2] => Paris) Array ( [0] => NYC [1] => LA [2] => Paris [3] => Paris ) Array ( [0] => LA [1] => Paris [2] => Paris ) None of the mentioned Array ( [0] => NYC [1] => LA [2] => Paris) Array ( [0] => NYC [1] => LA [2] => Paris [3] => Paris ) ANSWER DOWNLOAD EXAMIANS APP