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? sort() ksort() krsort() asort() usort() sort() ksort() krsort() asort() usort() ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$fruits = array ("mango", "apple", "pear", "peach");$fruits = array_flip($fruits);echo ($fruits[0]); peach error mango 0 peach error mango 0 ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays Which function can be used to move the pointer to the previous array position? prev() last() previous() before() prev() last() previous() before() 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; Sam is the brother of Bob and Bob) Sam is the brother of Bob and Bob) $brother Error $brother Sam is the brother of Bob and Bob) Sam is the brother of Bob and Bob) $brother Error $brother ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$fname = array("Peter", "Ben", "Joe");$age = array("35", "37", "43");$c = array_combine($fname, $age);print_r($c); Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 ) Array ( Peter Ben Joe ) Array ( “[Peter] => 35” “[Ben] => 37” “[Joe] => 43” ) Array ( 35 37 43 ) Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 ) Array ( Peter Ben Joe ) Array ( “[Peter] => 35” “[Ben] => 37” “[Joe] => 43” ) Array ( 35 37 43 ) ANSWER DOWNLOAD EXAMIANS APP
PHP Arrays What will be the output of the following PHP code?$a = array("A", "Cat", "Dog", "A", "Dog");print_r(array_count_values($a)); Array ( [A] => 2 [Cat] => 1 [Dog] => 1) Array ( [A] => 2 [Cat] => 2 [Dog] => 1 ) Array ( [A] => 2 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 1 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 2 [Cat] => 1 [Dog] => 1) Array ( [A] => 2 [Cat] => 2 [Dog] => 1 ) Array ( [A] => 2 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 1 [Cat] => 1 [Dog] => 2 ) ANSWER DOWNLOAD EXAMIANS APP