What elements will the following script output?<br/>$array = array (true => 'a', 1 => 'b');<br/>var_dump ($array); It will output NULL True => 'a', 1 => 'b' 1 => 'b' None 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] . "."; Error Sam is the brother of Bob and Bob) Sam is the brother of Bob and Jack Sam is the brother of Jack and Bob) 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($fname, $age);<br/>print_r($c); Array ( “[Peter] => 35” “[Ben] => 37” “[Joe] => 43” ) Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 ) Array ( Peter Ben Joe ) Array ( 35 37 43 ) 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 ( [a] => blue [b] => yellow [c] => red [d] => green ) Array ( [0] => red [1] => green [2] => blue [3] => 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 ( [35] => Peter [37] => Ben [43] => Joe ) Array ( 35 37 43 ) Array ( [Peter] => 35 [Ben] => 37 [Joe] => 43 ) Array ( Peter Ben Joe ) TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$arr = array ("picture1.JPG", "picture2.jpg", "Picture10.jpg", "picture20.jpg");<br/>sort($arr);<br/>print_r($arr); Array ( [0] => Picture10.jpg [1] => picture1.JPG [2] => picture2.jpg [3] => picture20.jpg ) Array ( [0] => picture1.JPG [1] => Picture10.jpg [2] => picture2.jpg [3] => picture20.jpg ) Array ( [0] => Picture10.jpg [1] => picture1.JPG [2] => picture20.jpg [3] => picture2.jpg ) Array ( [0] => picture1.JPG [1] => picture2.jpg [2] => Picture10.jpg [3] => picture20.jpg ) 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); Lucy Susan Edmund Peter 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 ( [1] => Array ( [1] => Volvo [2] => BMW ) [2] => Array ( [1] => Toyota [2] => Honda ) [3] => Array ( [1] => Mercedes [2] => Opel ) ) 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 ( [0] => Array ( [0] => Volvo [1] => BMW ) [1] => Array ( [0] => Toyota [1] => Honda ) [2] => Array ( [0] => Mercedes [1] => Opel ) ) 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] => red [1] => green [2] => blue [3] => yellow ) Array ( [0] => blue [1] => yellow ) Array ( [0] => blue [1] => yellow [2] => red [3] => green ) 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_slice ($fruits, 2);<br/>print_r ($subset); Array ( [0] => apple [1] => mango [2] => peach ) Array ( [0] => apple [1] => mango ) Array ( [0] => peach ) Array ( [0] => peach [1] => pear [2] => orange ) TRUE ANSWER : ? YOUR ANSWER : ?