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? krsort() sort() usort() asort() ksort() krsort() sort() usort() asort() ksort() ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$cars = array("Volvo", "BMW", "Toyota");echo "I like " . $cars[2] . ", " . $cars[1] . " and " . $cars[0] . "."; I like Toyota, BMW and Volvo I like BMW, Volvo and Toyota I like Volvo, Toyota and BMW I like Volvo, BMW and Toyota I like Toyota, BMW and Volvo I like BMW, Volvo and Toyota I like Volvo, Toyota and BMW I like Volvo, BMW and Toyota 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 Sam is the brother of Bob and Bob) $brother Sam is the brother of Bob and Bob) Error $brother Sam is the brother of Bob and Bob) $brother Sam is the brother of Bob and Bob) Error ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What functions count elements in an array?1. count2. Sizeof3. Array_Count4. Count_array Option 1 and 4 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 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); Peter Edmund Susan Lucy Peter Edmund Susan Lucy 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