Easy Tutorial
❮ Php Namespace Func Libxml Use Internal Errors ❯

PHP array_fill() Function

Complete PHP Array Reference Manual

Example

Fill an array with the given key-value pair:


Definition and Usage

The array_fill() function fills an array with a given key-value pair.


Syntax

Parameter Description
index Required. Specifies the starting index of the returned array.
number Required. Specifies the number of elements to fill, which must be greater than 0.
value Required. Specifies the key-value to use for filling the array.

Technical Details

Return Value: Returns the filled array.
PHP Version: 4.2+
--- ---
❮ Php Namespace Func Libxml Use Internal Errors ❯