How to combine two array in php?

In this post, The array_combine() is an inbuilt function in PHP which is used to combine two arrays and create a new array by using one array for keys and another array for values.

1. Code:

2. Example:

Input:

$fname=array("Bca","B.com","Bsc");
$age=array("35","37","43");

Output:

Array ( [Bca] => 35 [B.com] => 37 [Bsc] => 43 )