Fill an array with values, specifying keys in PHP
Description
The following code shows how to fill an array with values, specifying keys.
Example
/*from www .j a v a 2 s. com*/
<?php
$keys=array("a","b","c","d");
$a1=array_fill_keys($keys,"blue");
print_r($a1);
?>
The code above generates the following result.