PHP array_fill_keys() Function
Complete PHP Array Reference Manual
Example
Fill an array with values using the specified keys:
Run Example »
Definition and Usage
The array_fill_keys() function fills an array with values using the specified keys.
Syntax
array_fill_keys(
keys,value
);
| Parameters | Description |
|---|---|
| keys | Required. An array whose values will be used as the keys of the filled array. |
| value | Required. Specifies the value used to fill the array. |
Technical Details
| Return Value: | Returns the filled array. |
|---|---|
| PHP Version: | 5.2+ |
Complete PHP Array Reference Manual