From 08bcb4715c5f2b3a93fe64b7e12a9a6c4b247eb2 Mon Sep 17 00:00:00 2001 From: Sebastian Bergmann Date: Tue, 23 Oct 2001 05:26:24 +0000 Subject: [PATCH] array_init() documentation. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@60559 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/array.xml | 45 ++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 44 insertions(+), 1 deletion(-) diff --git a/functions/array.xml b/functions/array.xml index 118840c72d..4fd337b87e 100644 --- a/functions/array.xml +++ b/functions/array.xml @@ -1,5 +1,5 @@ - + Array Functions Arrays @@ -335,6 +335,49 @@ $trans = array_flip ($trans); + + + array_init + Initialize an array with values + + + Description + + + array array_init + int start_index + int num + mixed value + + + + array_init returns an array filled with + num entries of the value of the + value parameter, keys starting at the + start_index parameter. + + + + <function>array_init</function> example + +$a = array_init(5, 6, 'banana'); + +/* +$a now has the following entries: + +$a[5] = "banana"; +$a[6] = "banana"; +$a[7] = "banana"; +$a[8] = "banana"; +$a[9] = "banana"; +$a[10] = "banana"; +*/ + + + + + + array_intersect