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/>$fruits = array ("apple", "orange", array ("pear", "mango"), "banana");<br/>echo (count($fruits, 1)); 5 6 4 3 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; NULL 5 19 78 TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following php code?<br/>$states = array("karnataka" => array( "population" => "11,35,000", "captial" => "Bangalore"),"Tamil Nadu" => array( "population" => "17,90,000","captial" => "Chennai") );<br/>echo $states["karnataka"]["population"]; karnataka population population 11,35,000 11,35,000 karnataka 11,35,000 TRUE ANSWER : ? YOUR ANSWER : ?
Which function returns an array consisting of associative key/value pairs? count_values() array_count_values() count() array_count() TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$fruits = array ("apple", "orange", "banana");<br/>echo (next($fruits));<br/>echo (next($fruits)); appleapple orangebanana orangeorange appleorange TRUE ANSWER : ? YOUR ANSWER : ?
What will be the output of the following PHP code?<br/>$a1 = array("a"=>"red", "b"=>"green", "c"=>"blue", "d"=>"yellow");<br/>$a2 = array("e"=>"red", "f"=>"green", "g"=>"blue");<br/>$result = array_diff($a1, $a2);<br/>print_r($result); Array ( [a] => red ) Array ( [c] => blue ) Array ( [d] => yellow ) Array ( [e] => yellow ) TRUE ANSWER : ? YOUR ANSWER : ?
What elements will the following script output?<br/>$array = array (true => 'a', 1 => 'b');<br/>var_dump ($array); It will output NULL 1 => 'b' None True => 'a', 1 => 'b' 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 array as the object's 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/>$fruits = array ("mango", "apple", "pear", "peach");<br/>$fruits = array_flip($fruits);<br/>echo ($fruits[0]); mango peach error 0 TRUE ANSWER : ? YOUR ANSWER : ?