array_fill

It fills an array with the given values

Example

<?php
echo “<pre>”;
$array = array_fill(5,6,”PHP”);
print_r($array);
?>

Output

Array
(
[5] => PHP
[6] => PHP
[7] => PHP
[8] => PHP
[9] => PHP
[10] => PHP
)