The array_fill () function fills an array with the given value [function] This function returns a new array that is filled with the specified quantity of specified content. [Scope of use] php4 & gt; 4.2.0, php5. [use] arrayarray_fill (intstart_index,... SyntaxH
The array_fill () function fills the array with the given value
[Function]
This function returns a new array,
This array is filled with a specified number of specified content.
Scope of use]
Php4> 4.2.0, php5.
[Use]
Array array_fill (int start_index, int num, mixed value)
Start_index/required/start number of the key names in the new array
Num/required/number of new arrays filled. The value must be greater than zero. otherwise, php will issue a warning.
Value/required/value in the new array
[Example]
[Php]
Print_r (array_fill (5, 6, "hehe "));
/*
Array
(
[5] => hehe
[6] => hehe
[7] => hehe
[8] => hehe
[9] => hehe
[10] => hehe
)
*/
Taken from zuodefeng's note