Toggle navigation
Home
Latest pastes
FAQ
Random
Register
Login
Fill an array with values, specifying keys:
SUBMITTED BY:
henry1874w
DATE:
June 23, 2017, 9:25 p.m.
FORMAT:
Text only
SIZE:
91 Bytes
Raw
Download
Tweet
HITS:
265
Go to comments
Report
<?php
$keys=array("a","b","c","d");
$a1=array_fill_keys($keys,"blue");
print_r($a1);
?>
Please enable JavaScript to view the
comments powered by Disqus.
comments powered by
Disqus