Gen. partnerAlgotech

PHP function array_fill_keys()

Fill an array with values, specifying keys

|
September 11, 2019

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

Loading comments...

Stay in the loop

Subscribe to our newsletter and get the latest cybersecurity news delivered straight to your inbox.

Your data is safe. You can unsubscribe from the newsletter at any time.