From 968017a76c7b70b3240cb44f1f3b9308b67390c5 Mon Sep 17 00:00:00 2001 From: "Jesus M. Castagnetto" Date: Thu, 30 Nov 2000 06:52:34 +0000 Subject: [PATCH] Fixed the informalexample missing the programlisting children tag so the manual will build git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@36753 c90b9560-bf6c-de11-be94-00142212c4b1 --- functions/array.xml | 30 +++++++++++++++++------------- 1 file changed, 17 insertions(+), 13 deletions(-) diff --git a/functions/array.xml b/functions/array.xml index 0f55396bf4..4b7adc63f5 100644 --- a/functions/array.xml +++ b/functions/array.xml @@ -15,8 +15,8 @@ See also is_array, explode, - implode, split - and join. + implode, split + and join. @@ -50,12 +50,12 @@ - Syntax "index => values", separated by commas, define index - and values. index may be of type string or numeric. When index is - omitted, a integer index is automatically generated, starting - at 0. If index is an integer, next generated index will - be the biggest integer index + 1. Note that when two identical - index are defined, the last overwrite the first. + Syntax "index => values", separated by commas, define index + and values. index may be of type string or numeric. When index is + omitted, a integer index is automatically generated, starting + at 0. If index is an integer, next generated index will + be the biggest integer index + 1. Note that when two identical + index are defined, the last overwrite the first. The following example demonstrates how to create a @@ -83,6 +83,7 @@ print_r($array); which will display : + Array ( [0] => 1 @@ -93,6 +94,7 @@ Array [8] => 1 [9] => 19 ) + Note that index '3' is defined twice, and keep its final value of 13. Index 4 is defined after index 8, and next generated index (value 19) @@ -103,18 +105,20 @@ Array 1-based index with <function>Array</function> - $firstquarter = array(1 => 'January', 'February', 'March'); - print_r($firstquarter); + $firstquarter = array(1 => 'January', 'February', 'March'); + print_r($firstquarter); which will display : + Array ( - [1] => 'January' - [2] => 'February' - [3] => 'March' + [1] => 'January' + [2] => 'February' + [3] => 'March' ) +