Menu Riverview Church

ARRAY_FILL_KEYS

Fill an array with values, specifying keys

SYNTAX

array_fill_keys ( array $keys , mixed $value ) : array

PARAMETERS

keys

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

value

Value to use for filling

RETURN

Returns the filled array

EXAMPLES

Array
(
    [a] => abc
    [0] => abc
    [5] => abc
    [abc] => abc
)

PHP