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 BMW, Volvo and Toyota I like Toyota, BMW and Volvo I like Volvo, Toyota and BMW I like Volvo, BMW and Toyota 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 ) Array ( [0] => apple [1] => mango [2] => peach ) Error Array ( [0] => pear [1] => orange ) 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 Lucy Edmund Peter TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$number = array ("4", "hello", 2);<br/>echo (array_sum ($number)); 4hello2 4 2 6 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] => 1 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 2 [Cat] => 1 [Dog] => 2 ) Array ( [A] => 2 [Cat] => 2 [Dog] => 1 ) Array ( [A] => 2 [Cat] => 1 [Dog] => 1) TRUE ANSWER : ? YOUR ANSWER : ?
What function computes the difference of arrays? diff_array array_diff diff_arrays arrays_diff TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$number = range(0, 5);<br/>print_r ($number); Array ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 ) Array ( [0] => 0 [1] => 0 [2] => 0 [3] => 0 [4] => 0 [5] => 0 ) Array ( [0] => 5 [1] => 5 [2] => 5 [3] => 5 [4] => 5 [5] => 5 ) Array ( [0] => 0 [5] => 5 ) TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$array1 = array ("KA", "LA", "CA", "MA", "TA");<br/>$array2 = array ("KA", "IA", "CA", "GA", "TA");<br/>$inter = array_intersect ($array1, $array2);<br/>print_r ($inter); Array ( [0] => KA [2] => CA [4] => TA ) Array ( [0] => KA [1] => LA [2] => CA [3] => MA [4] => TA [5] => IA [6] => GA ) Array ( [1] => LA [3] => MA ) Array ( [1] => IA [3] => GA ) TRUE ANSWER : ? YOUR ANSWER : ?
What will the following script output?<br/>$array = array (1, 2, 3, 5, 8, 13, 21, 34, 55);<br/>$sum = 0;<br/>for ($i = 0; $i < 5; $i++) {<br/>$sum += $array[$array[$i]];<br/>}<br/>echo $sum; 5 78 19 NULL TRUE ANSWER : ? YOUR ANSWER : ?
What elements will the following script output?<br/>$array = array (true => 'a', 1 => 'b');<br/>var_dump ($array); 1 => 'b' None True => 'a', 1 => 'b' It will output NULL TRUE ANSWER : ? YOUR ANSWER : ?