What will be the output of the following PHP code?<br/>$a=array("A","Cat","Dog","A","Dog");<br/>$b=array("A","A","Cat","A","Tiger");<br/>$c=array_combine($a,$b);<br/>print_r(array_count_values($c)); Array ( [A] => 6 [Cat] => 1 [Dog] => 2 [Tiger] => 1 ) Array ( [A] => 2 [Cat] => 2 [Dog] => 1 [Tiger] => 1 ) Array ( [A] => 2 [Cat] => 1 [Dog] => 4 [Tiger] => 1 ) Array ( [A] => 5 [Cat] => 2 [Dog] => 2 [Tiger] => 1 ) TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$array = array("red", "green");<br/>array_push($array, "blue", "yellow");<br/>print_r($array); 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/>$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 : ?
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 green red none of the mentioned TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code ?<br/>$a = array("a" => "Jaguar", "b" => "Land Rover", "c" => "Audi", "d" => "Maseratti");<br/>echo array_search("Audi", $a); c d b a TRUE ANSWER : ? YOUR ANSWER : ?
What elements will the following script output?<br/>$array = array (true => 'a', 1 => 'b');<br/>var_dump ($array); True => 'a', 1 => 'b' It will output NULL None 1 => 'b' TRUE ANSWER : ? YOUR ANSWER : ?
Assume you would like to sort an array in ascending order by value while preserving key associations. Which of the following PHP sorting functions would you use? asort() krsort() usort() ksort() sort() 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 ) 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 ) Error 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/>$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] => picture20.jpg [3] => picture2.jpg ) 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] => picture1.JPG [1] => picture2.jpg [2] => Picture10.jpg [3] => picture20.jpg ) TRUE ANSWER : ? YOUR ANSWER : ?
What functions count elements in an array?<br/>1. count<br/>2. Sizeof<br/>3. Array_Count<br/>4. Count_array Option 2 and 4 Option 1 and 2 Option 3 and 4 Option 1 and 4 TRUE ANSWER : ? YOUR ANSWER : ?