?
What will be the output of the following PHP code ?
What will be the output of the following PHP code ?
<?php
$city_west = array("NYC", "London");
$city_east = array("Mumbai", "Beijing");
print_r(array_replace($city_west, $city_east));
?>
<?php
$city_west = array("NYC", "London");
$city_east = array("Mumbai", "Beijing");
print_r(array_replace($city_west, $city_east));
?>
Answer & Solution
Correct Answer:
Option
D
The array_replace() function replaces the values of the first array with the values from following arrays
Join the Discussion
Login to post a comment or share your explanation.
Login