PHP Arrays
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
Float, string
Even number, string
Integer, string
Positive number, negative number

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code ?
$a1 = array("a" => "red", "b" => "green", "c" => "blue", "d" => "yellow");
$result = array_flip($a1);
print_r($result);

Array ( [red] => red [green] => green [blue] => blue [yellow] => yellow )
Array ( [a] => a [b] => b [c] => c [d] => d )
Array ( [red] => a [green] => b [blue] => c [yellow] => d )
Array ( [a] => red [b] => green [c] => blue [d] => yellow )

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code ?
$age = array("Harry" => "21", "Ron" => "23","Malfoy" => "21");
array_change_key_case($age, CASE_UPPER);
array_pop($age);
print_r($age);

Array ( [HARRY] => 21 [RON] => 23 [MALFOY] => 21 )
Array ( [HARRY] => 21 [RON] => 23 )
Array ( [Harry] => 21 [Ron] => 23 [Malfoy] => 21 )
Array ( [Harry] => 21 [Ron] => 23 )

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code?
$a1 = array("a" => "red", "b" => "green", "c" => "blue", "d" => "yellow");
$a2 = array("e" => "red", "f" => "green", "g" => "blue", "h" => "orange");
$a3 = array("i" => "orange");
$a4 = array_combine($a2, $a3);
$result = array_diff($a4, $a2);
print_r($result);

Array ( [d] => yellow [h] => orange )
Array ( [h] => orange )
Array ( [d] => yellow )
Array ( [i] => orange )

ANSWER DOWNLOAD EXAMIANS APP