PHP Arrays
Which function returns an array consisting of associative key/value pairs?

array_count_values()
array_count()
count_values()
count()

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$a1 = array("red", "green");
$a2 = array("blue", "yellow");
$a3 = array_merge($a1, $a2);
$a4 = array("a", "b", "c", "d");
$a = array_combine($a4, $a3);
print_r($a);

Array ( [0] => red [1] => green [2] => blue [3] => yellow )
Array ( [a] => blue [b] => yellow [c] => red [d] => green )
Array ( [a] => red [b] => green [c] => blue [d] => yellow )
Array ( [0] => blue [1] => yellow [2] => red [3] => green )

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$age = array("Peter"=>"35", "Ben"=>"37", "Joe"=>"43");
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 )

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
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

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code ?
$array = array("red", "green");
array_push($array, "blue", "yellow");
print_r($array);

Array ( [0] => blue [1] => yellow )
Array ( [0] => blue [1] => yellow [2] => red [3] => green )
Array ( [0] => red [1] => green [2] => blue [3] => yellow )
Array ( [0] => red [1] => green )

ANSWER DOWNLOAD EXAMIANS APP