What will be the output of the following PHP code ?<br/>$a = array(12, 5, 2);<br/>echo(array_product($a)); 024 010 060 120 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$fruits = array ("apple", "mango", "peach", "pear", "orange");<br/>$subset = array_splice ($fruits, 2);<br/>print_r ($fruits); Array ( [0] => apple [1] => mango [2] => peach ) Error Array ( [0] => apple [1] => mango ) Array ( [0] => pear [1] => orange ) TRUE ANSWER : ? YOUR ANSWER : ?
What elements will the following script output?<br/>$array = array (true => 'a', 1 => 'b');<br/>var_dump ($array); 1 => 'b' It will output NULL None True => 'a', 1 => 'b' TRUE ANSWER : ? YOUR ANSWER : ?
Which function returns an array consisting of associative key/value pairs? count_values() count() array_count() array_count_values() TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$fruits = array ("apple", "orange", array ("pear", "mango"), "banana");<br/>echo (count($fruits, 1)); 5 4 3 6 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$a1 = array("red", "green");<br/>$a2 = array("blue", "yellow");<br/>print_r(array_merge($a1, $a2)); Array ( [0] => red [1] => green) Array ( [0] => red [1] => green [2] => blue [3] => yellow ) Array ( [0] => blue [1] => yellow [2] => red [3] => green ) Array ( [0] => blue [1] => yellow ) TRUE ANSWER : ? YOUR ANSWER : ?
What function computes the difference of arrays? arrays_diff diff_arrays diff_array array_diff TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$people = array("Peter", "Susan", "Edmund", "Lucy");<br/>echo pos($people); Susan Edmund Peter Lucy TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$names = array("Sam", "Bob", "Jack");<br/>echo $names[0] . "is the brother of " . $names[1] . " and " . $names[1] . ".".$brother; Sam is the brother of Bob and Bob) $brother Error Sam is the brother of Bob and Bob) $brother TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$a = array("A", "Cat", "Dog", "A", "Dog");<br/>print_r(array_count_values($a)); Array ( [A] => 2 [Cat] => 1 [Dog] => 1) Array ( [A] => 2 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 1 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 2 [Cat] => 2 [Dog] => 1 ) TRUE ANSWER : ? YOUR ANSWER : ?