PHP Arrays
What will be the output of the following PHP code?
$place = array("NYC", "LA", "Paris");
array_pop($place);
$place1 = array("Paris");
$place = array_merge($place, $place1);
print_r($place);

Array ( [0] => LA [1] => Paris [2] => Paris )
Array ( [0] => NYC [1] => LA [2] => Paris [3] => Paris )
Array ( [0] => NYC [1] => LA [2] => Paris)
None of the mentioned

ANSWER DOWNLOAD EXAMIANS APP

PHP Arrays
What will be the output of the following PHP code ?
$number = range(0, 5);
print_r ($number);

Array ( [0] => 0 [1] => 1 [2] => 2 [3] => 3 [4] => 4 [5] => 5 )
Array ( [0] => 5 [1] => 5 [2] => 5 [3] => 5 [4] => 5 [5] => 5 )
Array ( [0] => 0 [1] => 0 [2] => 0 [3] => 0 [4] => 0 [5] => 0 )
Array ( [0] => 0 [5] => 5 )

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 ( [a] => red [b] => green [c] => blue [d] => yellow )
Array ( [0] => red [1] => green [2] => blue [3] => yellow )
Array ( [a] => blue [b] => yellow [c] => red [d] => green )
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 ?
$a1 = array("a" => "red", "b" => "green", "c" => "blue", "d" => "yellow");
$a2 = array("e" => "red","f" => "green", "g" => "blue");
$result = array_intersect($a1, $a2);
print_r($result);

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

ANSWER DOWNLOAD EXAMIANS APP