Skip to main content

PHP array_fill() Function

 <?php

$b1=array_fill(5,6,"yellow");
print_r($b1);
?>


Output:
Array ( [5] => yellow [6] => yellow [7] => yellow [8] => yellow [9] => yellow [10] => yellow )


Syntex:
array_fill(index, number, value)

Comments