What will be the output of the following PHP code?<br/>$fruits = array ("apple", "orange", "banana");<br/>echo (next($fruits));<br/>echo (next($fruits)); orangebanana orangeorange appleorange appleapple TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$age = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43");<br/>print_r(array_change_key_case($age, CASE_UPPER)); Array ( [peter] => 35 [ben] => 37 [joe] => 43 ) Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 ) Array ( [PeTeR] => 35 [BeN] => 37 [Joe] => 43 ) Array ( [PETER] => 35 [BEN] => 37 [JOE] => 43 ) TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$age = array("Harry" => "21", "Ron" => "23","Malfoy" => "21");<br/>array_change_key_case($age, CASE_UPPER);<br/>array_pop($age);<br/>print_r($age); Array ( [Harry] => 21 [Ron] => 23 [Malfoy] => 21 ) Array ( [HARRY] => 21 [RON] => 23 ) Array ( [Harry] => 21 [Ron] => 23 ) Array ( [HARRY] => 21 [RON] => 23 [MALFOY] => 21 ) TRUE ANSWER : ? YOUR ANSWER : ?
There are three different kind of arrays: Numeric array, Associative array, Dimensional array Const array, Associative array, Multidimensional array Numeric array, String array, Multidimensional array Numeric array, Associative array, Multidimensional array TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$place = array("NYC", "LA", "Paris");<br/>array_pop($place);<br/>$place1 = array("Paris");<br/>$place = array_merge($place, $place1);<br/>print_r($place); Array ( [0] => NYC [1] => LA [2] => Paris [3] => Paris ) None of the mentioned Array ( [0] => NYC [1] => LA [2] => Paris) Array ( [0] => LA [1] => Paris [2] => Paris ) TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$cars = array("Volvo", "BMW", "Toyota", "Honda", "Mercedes", "Opel");<br/>print_r(array_chunk($cars, 2)); Array ( [0] => Array ( [1] => Volvo [2] => BMW ) [1] => Array ( [1] => Toyota [2] => Honda ) [2] => Array ( [1] => Mercedes [2] => Opel ) ) Array ( [0] => Array ( [0] => Volvo [1] => Volvo ) [1] => Array ( [0] => BMW [1] => BMW ) [2] => Array ( [0] => Toyota [1] => Toyota ) ) Array ( [1] => Array ( [1] => Volvo [2] => BMW ) [2] => Array ( [1] => Toyota [2] => Honda ) [3] => Array ( [1] => Mercedes [2] => Opel ) ) Array ( [0] => Array ( [0] => Volvo [1] => BMW ) [1] => Array ( [0] => Toyota [1] => Honda ) [2] => Array ( [0] => Mercedes [1] => Opel ) ) TRUE ANSWER : ? YOUR ANSWER : ?
What array will you get if you convert an object to an array? An array with properties of that object as the Key elements An array with properties of that object as the array's elements An array with keys of that object as the array's elements An array with properties of that array as the object's elements 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; Error Sam is the brother of Bob and Bob) $brother Sam is the brother of Bob and Bob) $brother 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; 78 NULL 5 19 TRUE ANSWER : ? YOUR ANSWER : ?
Which of the following are correct ways of creating an array?<br/>1. state[0] = “karnataka”;<br/>2. $state[] = array(“karnataka”);<br/>3. $state[0] = “karnataka”;<br/>4. $state = array(“karnataka”); 3 and 4 2 and 3 Only 1 2, 3 and 4 TRUE ANSWER : ? YOUR ANSWER : ?