Scriptindex.de

[ Menü ]

Home
News
Scripts
Neuzugänge
Suchen
Bücher
Manuals

[ Inhalt ]

Script eintragen
Tutorial eintragen
Newsletter
Umfragen
Link zu uns
Werbung bei uns
Kontakt
Impressum

[ Statistik ]

Hits gesamt: 5202868
Hits Heute: 971
max. Hits (10.07.07): 6964
User Online: 33
Scripts: 2828

[ Partner ]

CodeBase
I.S.U.M.
LUG Bayreuth
PEAR NEWS
PHP Classes

[ Facebook ]

[ Eigene Domain? ]

[ Buchtipp ]

Einstieg in PHP 4 - Webserver-Programmierung für Anfänger, mit CD
Einstieg in PHP 4 - Webserver-Programmierung für Anfänger, mit CD

Manuals > PHP > array_fill

array_fill

(PHP 4 >= 4.2.0)

array_fill -- Füllt ein Array mit Werten

Beschreibung

array array_fill ( int start_index, int num, mixed value)

array_fill() füllt ein Array mit num Einträgen des Wertes des value Parameters. Die Indizes des Arrays beginnen mit dem start_index Parameter. Beachten Sie, dass num eine Zahl größer als Null sein muss, ansonsten gibt PHP eine Warnung aus.

Beispiel 1. array_fill()

<?php
$a
= array_fill(5, 6, 'Banane');
print_r($a);
?>

Nun ist $a:

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


Copyright 1998 - 2009 by I.S.U.M.