Menu Samaritan's Purse

ARRAY_COMBINE

Creates an array by using one array for keys and another for its values

SYNTAX

array_combine ( array $keys , array $values ) : array

PARAMETERS

keys

Array of keys to be used. Illegal values for key will be converted to string.

values

Array of values to be used

RETURN

Returns the combined array, FALSE if the number of elements for each array isn't equal.

EXAMPLES

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

INTERNAL

array_merge

array_values

array_walk

EXTERNAL

PHP