// The array_combine() function creates an array by using the elements from one "keys" array and one "values" array.
$firstName=["gela", "bela", "lela"];
$age = [18, 19, 20];
$keyValue = array_combine($firstName, $age);
print_r($keyValue);
// ( "gela" => 18,  "bela" => 19, "lela" => 20 )
// Please note that both arrays should have equal quantity of elements !!!
by Luka Khitaridze
2 years ago
PHP
Array
0
Pro tip: use ```triple backticks around text``` to write in code fences