array_combine
Creates an array by using one array for keys and another for its values
Description
arrayarray_combine
arraykeys
arrayvalues
Returns an array by using the values from the
keys array as keys and the values from the
values array as the corresponding values.
Returns &false; if the number of elements for each array isn't equal or
if the arrays are empty.
A simple array_combine example
]]>
Outputs:
avocado
[red] => apple
[yellow] => banana
)
]]>
See also array_merge,
array_walk, and
array_values.