What will be the output of the following PHP code?<br/>$fruits = array ("apple", "orange", "banana");<br/>echo (next($fruits));<br/>echo (next($fruits)); orangeorange appleorange orangebanana appleapple TRUE ANSWER : ? YOUR ANSWER : ?
Which array function checks if the specified key exists in the array? array_key_exist() array_key_exists() arrays_key_exists() array_keys_exists() TRUE ANSWER : ? YOUR ANSWER : ?
Absent any actual need for choosing one method over the other, does passing arrays by value to a read-only function reduce performance compared to passing them by reference? No Yes, because PHP must monitor the execution of the function to determine if changes are made to the array. Yes, but only if the array is large. Yes, but only if the function modifies the contents of the array. Yes, because the interpreter must always create a copy of the array before passing it to the function. TRUE ANSWER : ? YOUR ANSWER : ?
What function computes the difference of arrays? arrays_diff array_diff diff_array diff_arrays TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$array = array("red", "green");<br/>array_push($array, "blue", "yellow");<br/>print_r($array); Array ( [0] => red [1] => green [2] => blue [3] => yellow ) Array ( [0] => red [1] => green ) Array ( [0] => blue [1] => yellow [2] => red [3] => green ) Array ( [0] => blue [1] => yellow ) TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$fname = array("Peter", "Ben", "Joe");<br/>$age = array("35", "37", "43");<br/>$c = array_combine($age, $fname);<br/>print_r($c); Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 ) Array ( Peter Ben Joe ) Array ( [35] => Peter [37] => Ben [43] => Joe ) Array ( 35 37 43 ) TRUE ANSWER : ? YOUR ANSWER : ?
Which function returns an array consisting of associative key/value pairs? count() array_count() array_count_values() count_values() TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$face = array ("A", "J", "Q", "K");<br/>$number = array ("2","3","4", "5", "6", "7", "8", "9", "10");<br/>$cards = array_merge ($face, $number);<br/>print_r ($cards); Array ( [0] => A [1] => J [2] => Q [3] => K [4] => 2 [5] => 3 [6] => 4 [7] => 5 [8] => 6 [9] => 7 [10] => 8 [11] => 9 [12] => 10 ) Array ( [0] => A [1] => 2 [2] => J [3] => 3 [4] => Q [5] => 4 [6] => K [7] => 5 [8] => 6 [9] => 7 [10] => 8 [11] => 9 [12] => 10 ) Error Array ( [0] => 2 [1] => 3 [2] => 4 [3] => 5 [4] => 6 [5] => 7 [6] => 8 [7] => 9 [8] => 10 [9] => A [10] => J [11] => Q [12] => K ) 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)); 4 6 5 3 TRUE ANSWER : ? YOUR ANSWER : ?
What functions count elements in an array?<br/>1. count<br/>2. Sizeof<br/>3. Array_Count<br/>4. Count_array Option 2 and 4 Option 3 and 4 Option 1 and 2 Option 1 and 4 TRUE ANSWER : ? YOUR ANSWER : ?