Creates an array by using the values from the keys array as keys and the values from the values array as the corresponding values

function array_combine<Tv1 as arraykey, Tv2>(
  mixed $keys,
  mixed $values,
): darray<Tv1, Tv2>;


  • mixed $keys - Array of keys to be used. Illegal values for key will be converted to string.
  • mixed $values - Array of values to be used


  • mixed - - Returns the combined array, FALSE if the number of elements for each array isn't equal or if the arrays are empty.