array_fill_keys

PHP 5 >= 5.2.0, PHP 7, PHP 8
array_fill_keys - Fill an array with values, specifying keys

Example #1 array_fill_keys example

Result: Array ( [foo] => banana [5] => banana [10] => banana [bar] => banana )
PHP Version:


Example #2 of array_fill_keys

PHP Version: