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 3 6 4 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$city_west = array("NYC", "London");<br/>$city_east = array("Mumbai", "Beijing");<br/>print_r(array_replace($city_west, $city_east)); Array ( [0] => NYC [1] => London ) Array ( [0] => Mumbai [1] => Beijing ) Array ( [1] => Mumbai [0] => Beijing ) Array ( [1] => NYC [0] => London ) TRUE ANSWER : ? YOUR ANSWER : ?
Which in-built function will add a value to the end of an array? into_array() array_push() array_unshift() inend_array() 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] . "."; Sam is the brother of Jack and Bob) Sam is the brother of Bob and Jack Sam is the brother of Bob and Bob) Error 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] => 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 ) Error 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 ) 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 ) 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] => blue [1] => yellow [2] => red [3] => green ) Array ( [0] => blue [1] => yellow ) Array ( [0] => red [1] => green [2] => blue [3] => yellow ) 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/>$a3 = array_merge($a1, $a2);<br/>$a4 = array("a", "b", "c", "d");<br/>$a = array_combine($a4, $a3);<br/>print_r($a); Array ( [a] => red [b] => green [c] => blue [d] => yellow ) Array ( [0] => blue [1] => yellow [2] => red [3] => green ) Array ( [0] => red [1] => green [2] => blue [3] => yellow ) Array ( [a] => blue [b] => yellow [c] => red [d] => green ) TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$a1 = array("a" => "red", "b" => "green", "c" => "blue", "d" => "yellow");<br/>$a2 = array("e" => "red", "f" => "green", "g" => "blue", "h" => "orange");<br/>$a3 = array("i" => "orange");<br/>$a4 = array_combine($a2, $a3);<br/>$result = array_diff($a4, $a2);<br/>print_r($result); Array ( [d] => yellow ) Array ( [i] => orange ) Array ( [h] => orange ) Array ( [d] => yellow [h] => orange ) TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$cars = array("Volvo", "BMW", "Toyota");<br/>echo "I like " . $cars[2] . ", " . $cars[1] . " and " . $cars[0] . "."; I like Toyota, BMW and Volvo I like Volvo, BMW and Toyota I like Volvo, Toyota and BMW I like BMW, Volvo and Toyota TRUE ANSWER : ? YOUR ANSWER : ?