What array will you get if you convert an object to an array? An array with properties of that array as the object's elements 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 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); Peter Lucy Susan Edmund TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$fruits = array ("mango", "apple", "peach", "pear");<br/>$fruits = asort ($fruits);<br/>printr ($fruits); Error Array ( [0] => apple [1] => mango [2] => peach [3] => pear ) Array ( [1] => apple [0] => mango [2] => peach [3] => pear ) Array ( [1] => apple [0] => mango [3] => peach [2] => pear ) TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$a = array("a"=>"red", "b"=>"green", "c"=>"blue");<br/>echo array_shift($a);<br/>print_r ($a); blue none of the mentioned red green 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 ) Array ( [Harry] => 21 [Ron] => 23 ) Array ( [Harry] => 21 [Ron] => 23 [Malfoy] => 21 ) Array ( [HARRY] => 21 [RON] => 23 [MALFOY] => 21 ) TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$a = array(12, 5, 2);<br/>echo(array_product($a)); 010 024 120 060 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 BMW, Volvo and Toyota I like Toyota, BMW and Volvo I like Volvo, BMW and Toyota I like Volvo, Toyota and BMW 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”); 2, 3 and 4 Only 1 3 and 4 2 and 3 TRUE ANSWER : ? YOUR ANSWER : ?
Array values are keyed by ______ values (called indexed arrays) or using ______ values (called associative arrays). Of course, these key methods can be combined as well. String, Boolean Positive number, negative number Even number, string Float, string Integer, string 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 ( [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 ) ) Array ( [0] => Array ( [1] => Volvo [2] => BMW ) [1] => Array ( [1] => Toyota [2] => Honda ) [2] => Array ( [1] => Mercedes [2] => Opel ) ) TRUE ANSWER : ? YOUR ANSWER : ?