?
What will be the output of the following PHP code?
What will be the output of the following PHP code?
<?php
$fname = array("Peter", "Ben", "Joe");
$age = array("35", "37", "43");
$c = array_combine($age, $fname);
print_r($c);
?>
<?php
$fname = array("Peter", "Ben", "Joe");
$age = array("35", "37", "43");
$c = array_combine($age, $fname);
print_r($c);
?>
Answer & Solution
Correct Answer:
Option
D
Here “keys” array is $age and “values” array is $fname.
Join the Discussion
Login to post a comment or share your explanation.
Login