From 736a15f1394b05fc758ef9dc2cc34ce761afc17d Mon Sep 17 00:00:00 2001 From: Philip Olson Date: Fri, 30 May 2003 18:12:53 +0000 Subject: [PATCH] Added php tags () to examples. git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@129443 c90b9560-bf6c-de11-be94-00142212c4b1 --- reference/array/functions/array-change-key-case.xml | 4 +++- reference/array/functions/array-chunk.xml | 4 +++- reference/array/functions/array-count-values.xml | 4 +++- reference/array/functions/array-fill.xml | 4 +++- reference/array/functions/array-filter.xml | 4 +++- reference/array/functions/array-flip.xml | 6 +++++- reference/array/functions/array-intersect.xml | 4 +++- reference/array/functions/array-key-exists.xml | 4 +++- reference/array/functions/array-merge-recursive.xml | 4 +++- reference/array/functions/array-merge.xml | 8 +++++++- reference/array/functions/array-multisort.xml | 6 +++++- reference/array/functions/array-pad.xml | 4 +++- reference/array/functions/array-push.xml | 6 +++++- reference/array/functions/array-reduce.xml | 4 +++- reference/array/functions/array-slice.xml | 4 +++- reference/array/functions/array-splice.xml | 4 +++- reference/array/functions/array-sum.xml | 4 +++- reference/array/functions/array-unshift.xml | 4 +++- reference/array/functions/arsort.xml | 4 +++- reference/array/functions/asort.xml | 4 +++- reference/array/functions/compact.xml | 4 +++- reference/array/functions/count.xml | 4 +++- reference/array/functions/each.xml | 8 +++++++- reference/array/functions/krsort.xml | 4 +++- reference/array/functions/rsort.xml | 4 +++- reference/array/functions/shuffle.xml | 4 +++- reference/array/functions/uksort.xml | 4 +++- reference/array/functions/usort.xml | 8 +++++++- 28 files changed, 102 insertions(+), 28 deletions(-) diff --git a/reference/array/functions/array-change-key-case.xml b/reference/array/functions/array-change-key-case.xml index 196bdc6e02..0fefc35058 100644 --- a/reference/array/functions/array-change-key-case.xml +++ b/reference/array/functions/array-change-key-case.xml @@ -1,5 +1,5 @@ - + @@ -28,8 +28,10 @@ <function>array_change_key_case</function> example 1, "SecOnd" => 4); print_r(array_change_key_case($input_array, CASE_UPPER)); +?> ]]> diff --git a/reference/array/functions/array-chunk.xml b/reference/array/functions/array-chunk.xml index a62df200f0..e9fff1865c 100644 --- a/reference/array/functions/array-chunk.xml +++ b/reference/array/functions/array-chunk.xml @@ -1,5 +1,5 @@ - + @@ -33,9 +33,11 @@ <function>array_chunk</function> example ]]> diff --git a/reference/array/functions/array-count-values.xml b/reference/array/functions/array-count-values.xml index 7a6348bbc6..0a8e52c852 100644 --- a/reference/array/functions/array-count-values.xml +++ b/reference/array/functions/array-count-values.xml @@ -1,5 +1,5 @@ - + @@ -22,8 +22,10 @@ <function>array_count_values</function> example ]]> diff --git a/reference/array/functions/array-fill.xml b/reference/array/functions/array-fill.xml index 422026a714..88e4e205c9 100644 --- a/reference/array/functions/array-fill.xml +++ b/reference/array/functions/array-fill.xml @@ -1,5 +1,5 @@ - + @@ -27,8 +27,10 @@ <function>array_fill</function> example ]]> diff --git a/reference/array/functions/array-filter.xml b/reference/array/functions/array-filter.xml index 85b7ac2356..b85dceed40 100644 --- a/reference/array/functions/array-filter.xml +++ b/reference/array/functions/array-filter.xml @@ -1,5 +1,5 @@ - + @@ -28,6 +28,7 @@ <function>array_filter</function> example ]]> diff --git a/reference/array/functions/array-flip.xml b/reference/array/functions/array-flip.xml index 724acbbeee..1654e3d86a 100644 --- a/reference/array/functions/array-flip.xml +++ b/reference/array/functions/array-flip.xml @@ -1,5 +1,5 @@ - + @@ -37,8 +37,10 @@ <function>array_flip</function> example ]]> @@ -48,9 +50,11 @@ $original = strtr ($str, $trans); <function>array_flip</function> example : collision 1, "b" => 1, "c" => 2); $trans = array_flip ($trans); print_r($trans); +?> ]]> diff --git a/reference/array/functions/array-intersect.xml b/reference/array/functions/array-intersect.xml index 9a604c3597..60dee81b26 100644 --- a/reference/array/functions/array-intersect.xml +++ b/reference/array/functions/array-intersect.xml @@ -1,5 +1,5 @@ - + @@ -25,9 +25,11 @@ <function>array_intersect</function> example "green", "red", "blue"); $array2 = array ("b" => "green", "yellow", "red"); $result = array_intersect ($array1, $array2); +?> ]]> diff --git a/reference/array/functions/array-key-exists.xml b/reference/array/functions/array-key-exists.xml index 72ac6be8e0..d03c6560c7 100644 --- a/reference/array/functions/array-key-exists.xml +++ b/reference/array/functions/array-key-exists.xml @@ -1,5 +1,5 @@ - + @@ -24,10 +24,12 @@ <function>array_key_exists</function> example 1, "second" => 4); if (array_key_exists("first", $search_array)) { echo "The 'first' element is in the array"; } +?> ]]> diff --git a/reference/array/functions/array-merge-recursive.xml b/reference/array/functions/array-merge-recursive.xml index 3b9d3f9856..9502657aa4 100644 --- a/reference/array/functions/array-merge-recursive.xml +++ b/reference/array/functions/array-merge-recursive.xml @@ -1,5 +1,5 @@ - + @@ -32,9 +32,11 @@ <function>array_merge_recursive</function> example array ("favorite" => "red"), 5); $ar2 = array (10, "color" => array ("favorite" => "green", "blue")); $result = array_merge_recursive ($ar1, $ar2); +?> ]]> diff --git a/reference/array/functions/array-merge.xml b/reference/array/functions/array-merge.xml index 729ceaba75..92f840a1ca 100644 --- a/reference/array/functions/array-merge.xml +++ b/reference/array/functions/array-merge.xml @@ -1,5 +1,5 @@ - + @@ -31,10 +31,12 @@ <function>array_merge</function> example "red", 2, 4); $array2 = array ("a", "b", "color" => "green", "shape" => "trapezoid", 4); $result = array_merge ($array1, $array2); print_r($result); +?> ]]> @@ -61,9 +63,11 @@ Array Simple <function>array_merge</function> example "data"); $result = array_merge($array1, $array2); +?> ]]> @@ -82,9 +86,11 @@ Array them to each other, use the + operator: "data"); $result = $array1 + $array2; +?> ]]> The numeric key will be preserved and thus the association remains. diff --git a/reference/array/functions/array-multisort.xml b/reference/array/functions/array-multisort.xml index b492157447..88469dbc64 100644 --- a/reference/array/functions/array-multisort.xml +++ b/reference/array/functions/array-multisort.xml @@ -1,5 +1,5 @@ - + @@ -72,9 +72,11 @@ Sorting multiple arrays ]]> @@ -90,9 +92,11 @@ array_multisort ($ar1, $ar2); Sorting multi-dimensional array ]]> diff --git a/reference/array/functions/array-pad.xml b/reference/array/functions/array-pad.xml index 82e97702ab..9906afbeb4 100644 --- a/reference/array/functions/array-pad.xml +++ b/reference/array/functions/array-pad.xml @@ -1,5 +1,5 @@ - + @@ -32,6 +32,7 @@ <function>array_pad</function> example ]]> diff --git a/reference/array/functions/array-push.xml b/reference/array/functions/array-push.xml index 92a6337e88..8ff37f1ba2 100644 --- a/reference/array/functions/array-push.xml +++ b/reference/array/functions/array-push.xml @@ -1,5 +1,5 @@ - + @@ -24,7 +24,9 @@ variables pushed. Has the same effect as: ]]> repeated for each var. @@ -37,9 +39,11 @@ $array[] = $var; <function>array_push</function> example ]]> diff --git a/reference/array/functions/array-reduce.xml b/reference/array/functions/array-reduce.xml index 04241049e9..0ce689e89b 100644 --- a/reference/array/functions/array-reduce.xml +++ b/reference/array/functions/array-reduce.xml @@ -1,5 +1,5 @@ - + @@ -30,6 +30,7 @@ <function>array_reduce</function> example ]]> diff --git a/reference/array/functions/array-slice.xml b/reference/array/functions/array-slice.xml index 400f5e95df..7a4605c3f9 100644 --- a/reference/array/functions/array-slice.xml +++ b/reference/array/functions/array-slice.xml @@ -1,5 +1,5 @@ - + @@ -47,12 +47,14 @@ <function>array_slice</function> examples ]]> diff --git a/reference/array/functions/array-splice.xml b/reference/array/functions/array-splice.xml index 2c21c0971b..d180f7c7e4 100644 --- a/reference/array/functions/array-splice.xml +++ b/reference/array/functions/array-splice.xml @@ -1,5 +1,5 @@ - + @@ -117,6 +117,7 @@ <function>array_splice</function> examples ]]> diff --git a/reference/array/functions/array-sum.xml b/reference/array/functions/array-sum.xml index 33722be49f..9d5b9c9eff 100644 --- a/reference/array/functions/array-sum.xml +++ b/reference/array/functions/array-sum.xml @@ -1,5 +1,5 @@ - + @@ -23,11 +23,13 @@ <function>array_sum</function> examples 1.2,"b"=>2.3,"c"=>3.4); echo "sum(b) = ".array_sum($b)."\n"; +?> ]]> diff --git a/reference/array/functions/array-unshift.xml b/reference/array/functions/array-unshift.xml index c154fc1b8b..edcadd5bd7 100644 --- a/reference/array/functions/array-unshift.xml +++ b/reference/array/functions/array-unshift.xml @@ -1,5 +1,5 @@ - + @@ -34,8 +34,10 @@ <function>array_unshift</function> example ]]> diff --git a/reference/array/functions/arsort.xml b/reference/array/functions/arsort.xml index 1dab75ece8..9adebe8b6f 100644 --- a/reference/array/functions/arsort.xml +++ b/reference/array/functions/arsort.xml @@ -1,5 +1,5 @@ - + @@ -25,12 +25,14 @@ <function>arsort</function> example "lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple"); arsort ($fruits); reset ($fruits); while (list ($key, $val) = each ($fruits)) { echo "$key = $val\n"; } +?> ]]> diff --git a/reference/array/functions/asort.xml b/reference/array/functions/asort.xml index dee47469be..fe5aa4120b 100644 --- a/reference/array/functions/asort.xml +++ b/reference/array/functions/asort.xml @@ -1,5 +1,5 @@ - + @@ -23,12 +23,14 @@ <function>asort</function> example "lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple"); asort ($fruits); reset ($fruits); while (list ($key, $val) = each ($fruits)) { echo "$key = $val\n"; } +?> ]]> diff --git a/reference/array/functions/compact.xml b/reference/array/functions/compact.xml index 1b0ce30210..b1e6932e1d 100644 --- a/reference/array/functions/compact.xml +++ b/reference/array/functions/compact.xml @@ -1,5 +1,5 @@ - + @@ -38,6 +38,7 @@ <function>compact</function> example ]]> diff --git a/reference/array/functions/count.xml b/reference/array/functions/count.xml index 2549c4cba9..d6de73c1af 100644 --- a/reference/array/functions/count.xml +++ b/reference/array/functions/count.xml @@ -1,5 +1,5 @@ - + @@ -41,6 +41,7 @@ ]]> diff --git a/reference/array/functions/each.xml b/reference/array/functions/each.xml index 7838659702..0a958a6e47 100644 --- a/reference/array/functions/each.xml +++ b/reference/array/functions/each.xml @@ -1,5 +1,5 @@ - + @@ -36,9 +36,11 @@ <function>each</function> examples ]]> @@ -57,9 +59,11 @@ Array "Bob", "Seppo" => "Sepi"); $bar = each ($foo); print_r($bar); +?> ]]> @@ -91,11 +95,13 @@ Array \n"; reset ($_POST); while (list ($key, $val) = each ($_POST)) { echo "$key => $val
\n"; } +?> ]]>
diff --git a/reference/array/functions/krsort.xml b/reference/array/functions/krsort.xml index 546208b95d..0b96179e7b 100644 --- a/reference/array/functions/krsort.xml +++ b/reference/array/functions/krsort.xml @@ -1,5 +1,5 @@ - + @@ -20,12 +20,14 @@ <function>krsort</function> example "lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple"); krsort ($fruits); reset ($fruits); while (list ($key, $val) = each ($fruits)) { echo "$key = $val\n"; } +?> ]]> diff --git a/reference/array/functions/rsort.xml b/reference/array/functions/rsort.xml index f8e28e6ff8..6ab16264cd 100644 --- a/reference/array/functions/rsort.xml +++ b/reference/array/functions/rsort.xml @@ -1,5 +1,5 @@ - + @@ -19,12 +19,14 @@ <function>rsort</function> example ]]> diff --git a/reference/array/functions/shuffle.xml b/reference/array/functions/shuffle.xml index aa9f405f8d..6c3dcc115d 100644 --- a/reference/array/functions/shuffle.xml +++ b/reference/array/functions/shuffle.xml @@ -1,5 +1,5 @@ - + @@ -20,12 +20,14 @@ <function>shuffle</function> example ]]> diff --git a/reference/array/functions/uksort.xml b/reference/array/functions/uksort.xml index 2682ad6458..80ef6b82e8 100644 --- a/reference/array/functions/uksort.xml +++ b/reference/array/functions/uksort.xml @@ -1,5 +1,5 @@ - + @@ -25,6 +25,7 @@ <function>uksort</function> example $b) ? -1 : 1; @@ -37,6 +38,7 @@ uksort ($a, "cmp"); while (list ($key, $value) = each ($a)) { echo "$key: $value\n"; } +?> ]]> diff --git a/reference/array/functions/usort.xml b/reference/array/functions/usort.xml index 5959682110..453f291c62 100644 --- a/reference/array/functions/usort.xml +++ b/reference/array/functions/usort.xml @@ -1,5 +1,5 @@ - + @@ -40,6 +40,7 @@ <function>usort</function> example ]]> @@ -83,6 +85,7 @@ while (list ($key, $value) = each ($a)) { ]]> @@ -124,6 +128,7 @@ $fruits[2]: lemons name."\n"; } +?> ]]>