From c9ae2d383c7f869893edba248f9c3d90ee6bd40b Mon Sep 17 00:00:00 2001 From: Damien Seguy Date: Tue, 4 Feb 2003 17:19:32 +0000 Subject: [PATCH] adding various tags git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@114767 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/array/functions/array-fill.xml | 5 +-- reference/array/functions/array-flip.xml | 4 +-- reference/array/functions/array-map.xml | 14 ++++---- reference/array/functions/array-merge.xml | 5 +-- reference/array/functions/array-push.xml | 3 +- reference/array/functions/array-shift.xml | 3 +- reference/array/functions/array-values.xml | 5 +-- reference/array/functions/array.xml | 8 ++--- reference/array/functions/each.xml | 38 +++++++++++++------- reference/array/functions/extract.xml | 41 +++++++++++----------- reference/array/functions/range.xml | 16 ++++----- reference/array/functions/usort.xml | 4 ++- 12 files changed, 83 insertions(+), 63 deletions(-) diff --git a/reference/array/functions/array-fill.xml b/reference/array/functions/array-fill.xml index dd523086b6..ad4db71b95 100644 --- a/reference/array/functions/array-fill.xml +++ b/reference/array/functions/array-fill.xml @@ -1,5 +1,5 @@ - + @@ -26,10 +26,11 @@ - $a now has the following entries using print_r: + $a now is : - + @@ -54,7 +54,7 @@ print_r($trans); ]]> - now $trans is : + now $trans is : - + @@ -10,12 +10,12 @@ Description - - arrayarray_map - callbackfunction - arrayarr1 - arrayarr2... - + + arrayarray_map + mixedcallback + arrayarr1 + array... + array_map returns an array containing all the elements of arr1 after applying the diff --git a/reference/array/functions/array-merge.xml b/reference/array/functions/array-merge.xml index db24decba6..729ceaba75 100644 --- a/reference/array/functions/array-merge.xml +++ b/reference/array/functions/array-merge.xml @@ -1,5 +1,5 @@ - + @@ -34,10 +34,11 @@ $array1 = array ("color" => "red", 2, 4); $array2 = array ("a", "b", "color" => "green", "shape" => "trapezoid", 4); $result = array_merge ($array1, $array2); +print_r($result); ]]> - The $result will be: + The $result is: - + @@ -39,6 +39,7 @@ $array[] = $var; diff --git a/reference/array/functions/array-shift.xml b/reference/array/functions/array-shift.xml index 34baa6c344..1388f65582 100644 --- a/reference/array/functions/array-shift.xml +++ b/reference/array/functions/array-shift.xml @@ -1,5 +1,5 @@ - + @@ -29,6 +29,7 @@ diff --git a/reference/array/functions/array-values.xml b/reference/array/functions/array-values.xml index 3d0aed6f6f..21404424a9 100644 --- a/reference/array/functions/array-values.xml +++ b/reference/array/functions/array-values.xml @@ -1,5 +1,5 @@ - + @@ -14,7 +14,8 @@ array_values returns all the values from the - input array. + input array and indexes numerically the + array. diff --git a/reference/array/functions/array.xml b/reference/array/functions/array.xml index 78c3c5d08a..9aaf07cdf2 100644 --- a/reference/array/functions/array.xml +++ b/reference/array/functions/array.xml @@ -1,5 +1,5 @@ - + @@ -99,9 +99,9 @@ print_r($firstquarter); 'January' - [2] => 'February' - [3] => 'March' + [1] => Janvier + [2] => Février + [3] => Mars ) ]]> diff --git a/reference/array/functions/each.xml b/reference/array/functions/each.xml index dd199ec183..7838659702 100644 --- a/reference/array/functions/each.xml +++ b/reference/array/functions/each.xml @@ -1,5 +1,5 @@ - + @@ -38,33 +38,45 @@ $bar now contains the following key/value pairs: - - 0 => 0 - 1 => 'bob' - key => 0 - value => 'bob' - + + bob + [value] => bob + [0] => 0 + [key] => 0 +) +]]> + "Bob", "Seppo" => "Sepi"); $bar = each ($foo); +print_r($bar); ]]> $bar now contains the following key/value pairs: - - 0 => 'Robert' - 1 => 'Bob' - key => 'Robert' - value => 'Bob' - + + Bob + [value] => Bob + [0] => Robert + [key] => Robert +) +]]> + diff --git a/reference/array/functions/extract.xml b/reference/array/functions/extract.xml index bcebb1dc88..1de00cd8fb 100644 --- a/reference/array/functions/extract.xml +++ b/reference/array/functions/extract.xml @@ -1,5 +1,5 @@ - + @@ -33,12 +33,12 @@ - EXTR_IF_EXISTS and EXTR_PREFIX_IF_EXISTS was introduced in version 4.2.0. + EXTR_IF_EXISTS and EXTR_PREFIX_IF_EXISTS was introduced in version 4.2.0. - EXTR_REFS was introduced in version 4.3.0. + EXTR_REFS was introduced in version 4.3.0. @@ -50,7 +50,7 @@ following values: - EXTR_OVERWRITE + EXTR_OVERWRITE If there is a collision, overwrite the existing variable. @@ -58,7 +58,7 @@ - EXTR_SKIP + EXTR_SKIP If there is a collision, don't overwrite the existing @@ -67,7 +67,7 @@ - EXTR_PREFIX_SAME + EXTR_PREFIX_SAME If there is a collision, prefix the variable name with prefix. @@ -75,7 +75,7 @@ - EXTR_PREFIX_ALL + EXTR_PREFIX_ALL Prefix all variable names with @@ -85,7 +85,7 @@ - EXTR_PREFIX_INVALID + EXTR_PREFIX_INVALID Only prefix invalid/numeric variable names with @@ -95,7 +95,7 @@ - EXTR_IF_EXISTS + EXTR_IF_EXISTS Only overwrite the variable if it already exists in the @@ -107,7 +107,7 @@ - EXTR_PREFIX_IF_EXISTS + EXTR_PREFIX_IF_EXISTS Only create prefixed variable names if the non-prefixed version @@ -117,7 +117,7 @@ - EXTR_REFS + EXTR_REFS Extracts variables as references. This effectively means that the @@ -133,12 +133,13 @@ If extract_type is not specified, it is - assumed to be EXTR_OVERWRITE. + assumed to be EXTR_OVERWRITE. Note that prefix is only required if - extract_type is EXTR_PREFIX_SAME, - EXTR_PREFIX_ALL, EXTR_PREFIX_INVALID or EXTR_PREFIX_IF_EXISTS. If + extract_type is EXTR_PREFIX_SAME, + EXTR_PREFIX_ALL, EXTR_PREFIX_INVALID + or EXTR_PREFIX_IF_EXISTS. If the prefixed result is not a valid variable name, it is not imported into the symbol table. @@ -184,19 +185,19 @@ blue, large, sphere, medium The $size wasn't overwritten, because we - specified EXTR_PREFIX_SAME, which resulted in - $wddx_size being created. If EXTR_SKIP was + specified EXTR_PREFIX_SAME, which resulted in + $wddx_size being created. If EXTR_SKIP was specified, then $wddx_size wouldn't even have been created. - EXTR_OVERWRITE would have caused $size to have - value "medium", and EXTR_PREFIX_ALL would result in new variables + EXTR_OVERWRITE would have caused $size to have + value "medium", and EXTR_PREFIX_ALL would result in new variables being named $wddx_color, $wddx_size, and $wddx_shape. You must use an associative array, a numerically indexed array - will not produce results unless you use EXTR_PREFIX_ALL or - EXTR_PREFIX_INVALID. + will not produce results unless you use EXTR_PREFIX_ALL or + EXTR_PREFIX_INVALID. See also compact. diff --git a/reference/array/functions/range.xml b/reference/array/functions/range.xml index 57a50eb8fe..576201913b 100644 --- a/reference/array/functions/range.xml +++ b/reference/array/functions/range.xml @@ -1,5 +1,5 @@ - + @@ -9,13 +9,13 @@ - Description - - arrayrange - mixedlow - mixedhigh - intstep - + Description + + arrayrange + intlow + inthigh + intstep + range returns an array of elements from low to high, diff --git a/reference/array/functions/usort.xml b/reference/array/functions/usort.xml index 16c2ee7c73..9cf6f7a584 100644 --- a/reference/array/functions/usort.xml +++ b/reference/array/functions/usort.xml @@ -1,5 +1,5 @@ - + @@ -160,9 +160,11 @@ foreach ($a as $item) { +