PHP array_fill() İşlev
Örnek
Bir diziyi değerlerle doldurun:
<?php
$a1=array_fill(3,4,"blue");
print_r($a1);
?>
Tanım ve Kullanım
array_fill() işlevi, bir diziyi değerlerle doldurur.
Sözdizimi
array_fill(index, number, value)
Parametre Değerleri
Parameter | Description |
---|---|
index | Required. The first index of the returned array |
number | Required. Specifies the number of elements to insert |
value | Required. Specifies the value to use for filling the array |
Teknik detaylar
Geri dönüş değeri: | Doldurulmuş diziyi döndürür |
---|---|
PHP Sürümü: | 4.2+ |
❮ PHP Dizi Referansı