Vidyalelo
PHP · Q18

Arrays

Programming · PHP · question 18

Q18

What will be the output of the following PHP code?

A.
Array ( [0] => LA [1] => Paris [2] => Paris )
Answer
B.
Array ( [0] => NYC [1] => LA [2] => Paris)
C.
Array ( [0] => NYC [1] => LA [2] => Paris [3] => Paris )
D.
None of the mentioned

Answer: Option A

Solution

Answer: Option A
Solution:
array_merge() and array_pop() yields that result.