Vidyalelo
PHP · Q24

Arrays

Programming · PHP · question 24

Q24

What will be the output of the following PHP code ?

A.
Array ( [1] => Mumbai [0] => Beijing )
B.
Array ( [0] => NYC [1] => London )
C.
Array ( [1] => NYC [0] => London )
D.
Array ( [0] => Mumbai [1] => Beijing )
Answer

Answer: Option D

Solution

Answer: Option D
Solution:
The array_replace() function replaces the values of the first array with the values from following arrays