array_fill — 用给定的值填充数组
array_fill — 用给定的值填充数组
说明
array_fill ( int
$start_index , int $num , mixed $value ) : arrayarray_fill() 用 value 参数的值将一个数组填充 num 个条目,键名由 start_index 参数指定的开始。https://www.miqile.cn/
参数
start_index-
返回的数组的第一个索引值。
如果
start_index是负数, 那么返回的数组的第一个索引将会是start_index,而后面索引则从0开始。 (参见 例子)。 num-
插入元素的数量。 必须大于或等于 0。
value-
用来填充的值。
返回值
返回填充后的数组。
错误/异常
如果 num 小于零,将会抛出 E_WARNING。
浙公网安备 33010602011771号