ExamVeda
Login
Home
This question belongs to PHP Arrays
Arrays
?

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

Answer & Solution
Correct Answer: Option A
array_merge() and array_pop() yields that result.
Examveda
Question posted by Examveda
Community

Join the Discussion

4 Comments
286 Vaja
286 Vaja 5 years ago
That's a wrong answer array_pop() is popped last array element and array_merge() is combining the both array so Correct answer is B
CS VN
CS VN 5 years ago
WHAT?
[0] => NYC [1] => LA [2] => Paris
CS VN
CS VN 5 years ago
correct is BBBBBBBB! please check again !
CS VN
CS VN 6 years ago
the anser is wrong, please check it !!
true is B