|
array_combineCreates an array by using one array for keys and another for its values Description
array array_combine(array
$keys, array $values)
Creates an array by using the values from the
Parameters
Return ValuesReturns the combined array. Errors/Exceptions
As of PHP 8.0.0, a ValueError is thrown if the number of elements in
Changelog
Examples
Example #1 A simple array_combine example The above example will output:
Array
(
[green] => avocado
[red] => apple
[yellow] => banana
)
See Also
|