?
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($fname, $age);
print_r($c);
?>
<?php
$fname = array("Peter", "Ben", "Joe");
$age = array("35", "37", "43");
$c = array_combine($fname, $age);
print_r($c);
?>
Answer & Solution
Correct Answer:
Option
B
The array_combine() function creates an array by using the elements from one “keys” array and one “values” array.
Join the Discussion
Login to post a comment or share your explanation.
Login