Create an array using the current array as keys and the other array as values.

/**
 * Create an array using the current array as keys and the other array as values.
 *
 * @param array $array Values array
 *
 * @return self Returns instance of The Arrays class.
 */
public function combine(array $array): self

Examples

$arrays = Arrays::create(['green', 'red', 'yellow'])->combine(['avacado', 'apple', 'banana'])->toArray();

print_r($arrays);

The above example will output:

Array
(
    [green] => avacado
    [red] => apple
    [yellow] => banana
)

Getting Started

Methods