PHP function array_fill_keys()

Availability in versions: PHP 5.2.0

Fill an array with values, specifying keys

Parameters

Parameter Data type Default value Note
$keys array not Array of values that will be used as keys. Illegal values for key will be converted to string.
$value mixed not Value to use for filling

Return values

array

the filled array

Other resources

Official documentation of the array-fill-keys function

Newsletter

Nejlepsi tipy a triky o PHP do Vaseho e-mailu. Clanky a novinky nejen ze sveta PHP a programovani.