cece Sun Aug 17 08:21:04 2003 EDT
Modified files:
/phpdoc/en/reference/array/functions array-combine.xml
array-count-values.xml
array-diff-assoc.xml
array-diff.xml
array-filter.xml
array-flip.xml
array-intersect-assoc.xml
array-intersect.xml
array-keys.xml array-map.xml
array-merge-recursive.xml
array-merge.xml
array-multisort.xml
array-pad.xml array-pop.xml
array-push.xml array-rand.xml
array-reverse.xml
array-shift.xml
array-slice.xml
array-splice.xml
array-unique.xml
array-unshift.xml
array-values.xml
array-walk.xml array.xml
arsort.xml asort.xml
compact.xml count.xml each.xml
end.xml extract.xml
in-array.xml key.xml
krsort.xml ksort.xml list.xml
natsort.xml range.xml
rsort.xml shuffle.xml sort.xml
uksort.xml usort.xml
Log:
applying PEAR coding standards on examples
Index: phpdoc/en/reference/array/functions/array-combine.xml
diff -u phpdoc/en/reference/array/functions/array-combine.xml:1.3
phpdoc/en/reference/array/functions/array-combine.xml:1.4
--- phpdoc/en/reference/array/functions/array-combine.xml:1.3 Fri May 30 11:04:06
2003
+++ phpdoc/en/reference/array/functions/array-combine.xml Sun Aug 17 08:21:03
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="function.array-combine">
<refnamediv>
<refname>array_combine</refname>
@@ -29,8 +29,8 @@
<programlisting role="php">
<![CDATA[
<?php
-$a = array('green','red','yellow');
-$b = array('avocado','apple','banana');
+$a = array('green', 'red', 'yellow');
+$b = array('avocado', 'apple', 'banana');
$c = array_combine($a, $b);
print_r($c);
Index: phpdoc/en/reference/array/functions/array-count-values.xml
diff -u phpdoc/en/reference/array/functions/array-count-values.xml:1.9
phpdoc/en/reference/array/functions/array-count-values.xml:1.10
--- phpdoc/en/reference/array/functions/array-count-values.xml:1.9 Fri Jul 25
12:38:56 2003
+++ phpdoc/en/reference/array/functions/array-count-values.xml Sun Aug 17 08:21:03
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.9 $ -->
+<!-- $Revision: 1.10 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-count-values">
<refnamediv>
@@ -23,8 +23,8 @@
<programlisting role="php">
<![CDATA[
<?php
-$array = array (1, "hello", 1, "world", "hello");
-print_r(array_count_values ($array));
+$array = array(1, "hello", 1, "world", "hello");
+print_r(array_count_values($array));
?>
]]>
</programlisting>
Index: phpdoc/en/reference/array/functions/array-diff-assoc.xml
diff -u phpdoc/en/reference/array/functions/array-diff-assoc.xml:1.2
phpdoc/en/reference/array/functions/array-diff-assoc.xml:1.3
--- phpdoc/en/reference/array/functions/array-diff-assoc.xml:1.2 Fri Jan 10
17:22:39 2003
+++ phpdoc/en/reference/array/functions/array-diff-assoc.xml Sun Aug 17 08:21:03
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.14 -->
<refentry id="function.array-diff-assoc">
<refnamediv>
@@ -27,9 +27,9 @@
<programlisting role="php">
<![CDATA[
<?php
-$array1 = array ("a" => "green", "b" => "brown", "c" => "blue", "red");
-$array2 = array ("a" => "green", "yellow", "red");
-$result = array_diff_assoc ($array1, $array2);
+$array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red");
+$array2 = array("a" => "green", "yellow", "red");
+$result = array_diff_assoc($array1, $array2);
/* The result is:
Array
Index: phpdoc/en/reference/array/functions/array-diff.xml
diff -u phpdoc/en/reference/array/functions/array-diff.xml:1.9
phpdoc/en/reference/array/functions/array-diff.xml:1.10
--- phpdoc/en/reference/array/functions/array-diff.xml:1.9 Wed Jul 16 13:06:57
2003
+++ phpdoc/en/reference/array/functions/array-diff.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.9 $ -->
+<!-- $Revision: 1.10 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.14 -->
<refentry id="function.array-diff">
<refnamediv>
@@ -26,9 +26,9 @@
<programlisting role="php">
<![CDATA[
<?php
-$array1 = array ("a" => "green", "red", "blue", "red");
-$array2 = array ("b" => "green", "yellow", "red");
-$result = array_diff ($array1, $array2);
+$array1 = array("a" => "green", "red", "blue", "red");
+$array2 = array("b" => "green", "yellow", "red");
+$result = array_diff($array1, $array2);
?>
]]>
</programlisting>
Index: phpdoc/en/reference/array/functions/array-filter.xml
diff -u phpdoc/en/reference/array/functions/array-filter.xml:1.11
phpdoc/en/reference/array/functions/array-filter.xml:1.12
--- phpdoc/en/reference/array/functions/array-filter.xml:1.11 Mon Jun 16 08:03:39
2003
+++ phpdoc/en/reference/array/functions/array-filter.xml Sun Aug 17 08:21:03
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.11 $ -->
+<!-- $Revision: 1.12 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.62 -->
<refentry id="function.array-filter">
<refnamediv>
@@ -30,15 +30,15 @@
<![CDATA[
<?php
function odd($var) {
- return ($var % 2 == 1);
+ return($var % 2 == 1);
}
function even($var) {
- return ($var % 2 == 0);
+ return($var % 2 == 0);
}
-$array1 = array ("a"=>1, "b"=>2, "c"=>3, "d"=>4, "e"=>5);
-$array2 = array (6, 7, 8, 9, 10, 11, 12);
+$array1 = array("a"=>1, "b"=>2, "c"=>3, "d"=>4, "e"=>5);
+$array2 = array(6, 7, 8, 9, 10, 11, 12);
echo "Odd :\n";
print_r(array_filter($array1, "odd"));
Index: phpdoc/en/reference/array/functions/array-flip.xml
diff -u phpdoc/en/reference/array/functions/array-flip.xml:1.10
phpdoc/en/reference/array/functions/array-flip.xml:1.11
--- phpdoc/en/reference/array/functions/array-flip.xml:1.10 Thu Jul 17 18:38:54
2003
+++ phpdoc/en/reference/array/functions/array-flip.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.107 -->
<refentry id="function.array-flip">
<refnamediv>
@@ -38,8 +38,8 @@
<programlisting role="php">
<![CDATA[
<?php
-$trans = array_flip ($trans);
-$original = strtr ($str, $trans);
+$trans = array_flip($trans);
+$original = strtr($str, $trans);
?>
]]>
</programlisting>
@@ -51,8 +51,8 @@
<programlisting role="php">
<![CDATA[
<?php
-$trans = array ("a" => 1, "b" => 1, "c" => 2);
-$trans = array_flip ($trans);
+$trans = array("a" => 1, "b" => 1, "c" => 2);
+$trans = array_flip($trans);
print_r($trans);
?>
]]>
Index: phpdoc/en/reference/array/functions/array-intersect-assoc.xml
diff -u phpdoc/en/reference/array/functions/array-intersect-assoc.xml:1.2
phpdoc/en/reference/array/functions/array-intersect-assoc.xml:1.3
--- phpdoc/en/reference/array/functions/array-intersect-assoc.xml:1.2 Fri Jan 10
17:22:40 2003
+++ phpdoc/en/reference/array/functions/array-intersect-assoc.xml Sun Aug 17
08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.2 $ -->
+<!-- $Revision: 1.3 $ -->
<refentry id="function.array-intersect-assoc">
<refnamediv>
<refname>array_intersect_assoc</refname>
@@ -25,9 +25,9 @@
<programlisting role="php">
<![CDATA[
<?php
-$array1 = array ("a" => "green", "b" => "brown", "c" => "blue", "red");
-$array2 = array ("a" => "green", "yellow", "red");
-$result_array = array_intersect_assoc ($array1, $array2);
+$array1 = array("a" => "green", "b" => "brown", "c" => "blue", "red");
+$array2 = array("a" => "green", "yellow", "red");
+$result_array = array_intersect_assoc($array1, $array2);
/* $result_array will look like:
Index: phpdoc/en/reference/array/functions/array-intersect.xml
diff -u phpdoc/en/reference/array/functions/array-intersect.xml:1.9
phpdoc/en/reference/array/functions/array-intersect.xml:1.10
--- phpdoc/en/reference/array/functions/array-intersect.xml:1.9 Fri Jul 25 12:33:04
2003
+++ phpdoc/en/reference/array/functions/array-intersect.xml Sun Aug 17 08:21:03
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.9 $ -->
+<!-- $Revision: 1.10 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.14 -->
<refentry id="function.array-intersect">
<refnamediv>
@@ -26,9 +26,9 @@
<programlisting role="php">
<![CDATA[
<?php
-$array1 = array ("a" => "green", "red", "blue");
-$array2 = array ("b" => "green", "yellow", "red");
-$result = array_intersect ($array1, $array2);
+$array1 = array("a" => "green", "red", "blue");
+$array2 = array("b" => "green", "yellow", "red");
+$result = array_intersect($array1, $array2);
?>
]]>
</programlisting>
Index: phpdoc/en/reference/array/functions/array-keys.xml
diff -u phpdoc/en/reference/array/functions/array-keys.xml:1.7
phpdoc/en/reference/array/functions/array-keys.xml:1.8
--- phpdoc/en/reference/array/functions/array-keys.xml:1.7 Mon Jun 16 08:03:39
2003
+++ phpdoc/en/reference/array/functions/array-keys.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-keys">
<refnamediv>
@@ -30,15 +30,15 @@
<programlisting role="php">
<![CDATA[
<?php
-$array = array (0 => 100, "color" => "red");
-print_r(array_keys ($array));
+$array = array(0 => 100, "color" => "red");
+print_r(array_keys($array));
-$array = array ("blue", "red", "green", "blue", "blue");
-print_r(array_keys ($array, "blue"));
+$array = array("blue", "red", "green", "blue", "blue");
+print_r(array_keys($array, "blue"));
-$array = array ("color" => array("blue", "red", "green"),
- "size" => array("small", "medium", "large"));
-print_r(array_keys ($array));
+$array = array("color" => array("blue", "red", "green"),
+ "size" => array("small", "medium", "large"));
+print_r(array_keys($array));
?>
]]>
</programlisting>
Index: phpdoc/en/reference/array/functions/array-map.xml
diff -u phpdoc/en/reference/array/functions/array-map.xml:1.9
phpdoc/en/reference/array/functions/array-map.xml:1.10
--- phpdoc/en/reference/array/functions/array-map.xml:1.9 Mon Jun 16 08:03:39
2003
+++ phpdoc/en/reference/array/functions/array-map.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.9 $ -->
+<!-- $Revision: 1.10 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.62 -->
<refentry id="function.array-map">
<refnamediv>
@@ -32,7 +32,7 @@
<![CDATA[
<?php
function cube($n) {
- return $n*$n*$n;
+ return($n * $n * $n);
}
$a = array(1, 2, 3, 4, 5);
@@ -65,11 +65,11 @@
<![CDATA[
<?php
function show_Spanish($n, $m) {
- return "The number $n is called $m in Spanish";
+ return("The number $n is called $m in Spanish");
}
function map_Spanish($n, $m) {
- return array ($n => $m);
+ return(array($n => $m));
}
$a = array(1, 2, 3, 4, 5);
Index: phpdoc/en/reference/array/functions/array-merge-recursive.xml
diff -u phpdoc/en/reference/array/functions/array-merge-recursive.xml:1.6
phpdoc/en/reference/array/functions/array-merge-recursive.xml:1.7
--- phpdoc/en/reference/array/functions/array-merge-recursive.xml:1.6 Mon Jun 16
08:03:39 2003
+++ phpdoc/en/reference/array/functions/array-merge-recursive.xml Sun Aug 17
08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.12 -->
<refentry id="function.array-merge-recursive">
<refnamediv>
@@ -33,9 +33,9 @@
<programlisting role="php">
<![CDATA[
<?php
-$ar1 = array ("color" => array ("favorite" => "red"), 5);
-$ar2 = array (10, "color" => array ("favorite" => "green", "blue"));
-$result = array_merge_recursive ($ar1, $ar2);
+$ar1 = array("color" => array("favorite" => "red"), 5);
+$ar2 = array(10, "color" => array("favorite" => "green", "blue"));
+$result = array_merge_recursive($ar1, $ar2);
?>
]]>
</programlisting>
Index: phpdoc/en/reference/array/functions/array-merge.xml
diff -u phpdoc/en/reference/array/functions/array-merge.xml:1.10
phpdoc/en/reference/array/functions/array-merge.xml:1.11
--- phpdoc/en/reference/array/functions/array-merge.xml:1.10 Fri Jul 25 12:38:56
2003
+++ phpdoc/en/reference/array/functions/array-merge.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-merge">
<refnamediv>
@@ -32,9 +32,9 @@
<programlisting role="php">
<![CDATA[
<?php
-$array1 = array ("color" => "red", 2, 4);
-$array2 = array ("a", "b", "color" => "green", "shape" => "trapezoid", 4);
-$result = array_merge ($array1, $array2);
+$array1 = array("color" => "red", 2, 4);
+$array2 = array("a", "b", "color" => "green", "shape" => "trapezoid", 4);
+$result = array_merge($array1, $array2);
print_r($result);
?>
]]>
Index: phpdoc/en/reference/array/functions/array-multisort.xml
diff -u phpdoc/en/reference/array/functions/array-multisort.xml:1.6
phpdoc/en/reference/array/functions/array-multisort.xml:1.7
--- phpdoc/en/reference/array/functions/array-multisort.xml:1.6 Fri May 30 14:12:53
2003
+++ phpdoc/en/reference/array/functions/array-multisort.xml Sun Aug 17 08:21:03
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.11 -->
<refentry id="function.array-multisort">
<refnamediv>
@@ -73,9 +73,9 @@
<programlisting role="php">
<![CDATA[
<?php
-$ar1 = array ("10", 100, 100, "a");
-$ar2 = array (1, 3, "2", 1);
-array_multisort ($ar1, $ar2);
+$ar1 = array("10", 100, 100, "a");
+$ar2 = array(1, 3, "2", 1);
+array_multisort($ar1, $ar2);
?>
]]>
</programlisting>
@@ -93,9 +93,9 @@
<programlisting role="php">
<![CDATA[
<?php
-$ar = array (array ("10", 100, 100, "a"), array (1, 3, "2", 1));
-array_multisort ($ar[0], SORT_ASC, SORT_STRING,
- $ar[1], SORT_NUMERIC, SORT_DESC);
+$ar = array(array("10", 100, 100, "a"), array(1, 3, "2", 1));
+array_multisort($ar[0], SORT_ASC, SORT_STRING,
+ $ar[1], SORT_NUMERIC, SORT_DESC);
?>
]]>
</programlisting>
Index: phpdoc/en/reference/array/functions/array-pad.xml
diff -u phpdoc/en/reference/array/functions/array-pad.xml:1.6
phpdoc/en/reference/array/functions/array-pad.xml:1.7
--- phpdoc/en/reference/array/functions/array-pad.xml:1.6 Fri Jul 25 12:38:56
2003
+++ phpdoc/en/reference/array/functions/array-pad.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-pad">
<refnamediv>
@@ -33,15 +33,15 @@
<programlisting role="php">
<![CDATA[
<?php
-$input = array (12, 10, 9);
+$input = array(12, 10, 9);
-$result = array_pad ($input, 5, 0);
-// result is array (12, 10, 9, 0, 0)
+$result = array_pad($input, 5, 0);
+// result is array(12, 10, 9, 0, 0)
-$result = array_pad ($input, -7, -1);
-// result is array (-1, -1, -1, -1, 12, 10, 9)
+$result = array_pad($input, -7, -1);
+// result is array(-1, -1, -1, -1, 12, 10, 9)
-$result = array_pad ($input, 2, "noop");
+$result = array_pad($input, 2, "noop");
// not padded
?>
]]>
Index: phpdoc/en/reference/array/functions/array-pop.xml
diff -u phpdoc/en/reference/array/functions/array-pop.xml:1.7
phpdoc/en/reference/array/functions/array-pop.xml:1.8
--- phpdoc/en/reference/array/functions/array-pop.xml:1.7 Mon Jun 16 08:03:39
2003
+++ phpdoc/en/reference/array/functions/array-pop.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-pop">
<refnamediv>
@@ -28,8 +28,8 @@
<programlisting role="php">
<![CDATA[
<?php
-$stack = array ("orange", "banana", "apple", "raspberry");
-$fruit = array_pop ($stack);
+$stack = array("orange", "banana", "apple", "raspberry");
+$fruit = array_pop($stack);
print_r($stack);
?>
]]>
Index: phpdoc/en/reference/array/functions/array-push.xml
diff -u phpdoc/en/reference/array/functions/array-push.xml:1.7
phpdoc/en/reference/array/functions/array-push.xml:1.8
--- phpdoc/en/reference/array/functions/array-push.xml:1.7 Mon Jun 16 08:03:39
2003
+++ phpdoc/en/reference/array/functions/array-push.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-push">
<refnamediv>
@@ -40,8 +40,8 @@
<programlisting role="php">
<![CDATA[
<?php
-$stack = array ("orange", "banana");
-array_push ($stack, "apple", "raspberry");
+$stack = array("orange", "banana");
+array_push($stack, "apple", "raspberry");
print_r($stack);
?>
]]>
Index: phpdoc/en/reference/array/functions/array-rand.xml
diff -u phpdoc/en/reference/array/functions/array-rand.xml:1.7
phpdoc/en/reference/array/functions/array-rand.xml:1.8
--- phpdoc/en/reference/array/functions/array-rand.xml:1.7 Fri Jul 25 12:38:56
2003
+++ phpdoc/en/reference/array/functions/array-rand.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.13 -->
<refentry id="function.array-rand">
<refnamediv>
@@ -37,11 +37,11 @@
<programlisting role="php">
<![CDATA[
<?php
-srand ((float) microtime() * 10000000);
-$input = array ("Neo", "Morpheus", "Trinity", "Cypher", "Tank");
-$rand_keys = array_rand ($input, 2);
-print $input[$rand_keys[0]]."\n";
-print $input[$rand_keys[1]]."\n";
+srand((float) microtime() * 10000000);
+$input = array("Neo", "Morpheus", "Trinity", "Cypher", "Tank");
+$rand_keys = array_rand($input, 2);
+print $input[$rand_keys[0]] . "\n";
+print $input[$rand_keys[1]] . "\n";
?>
]]>
</programlisting>
Index: phpdoc/en/reference/array/functions/array-reverse.xml
diff -u phpdoc/en/reference/array/functions/array-reverse.xml:1.7
phpdoc/en/reference/array/functions/array-reverse.xml:1.8
--- phpdoc/en/reference/array/functions/array-reverse.xml:1.7 Thu Jul 17 18:38:54
2003
+++ phpdoc/en/reference/array/functions/array-reverse.xml Sun Aug 17 08:21:03
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.62 -->
<refentry id="function.array-reverse">
<refnamediv>
@@ -27,9 +27,9 @@
<programlisting role="php">
<![CDATA[
<?php
-$input = array ("php", 4.0, array ("green", "red"));
-$result = array_reverse ($input);
-$result_keyed = array_reverse ($input, TRUE);
+$input = array("php", 4.0, array("green", "red"));
+$result = array_reverse($input);
+$result_keyed = array_reverse($input, TRUE);
?>
]]>
</programlisting>
Index: phpdoc/en/reference/array/functions/array-shift.xml
diff -u phpdoc/en/reference/array/functions/array-shift.xml:1.8
phpdoc/en/reference/array/functions/array-shift.xml:1.9
--- phpdoc/en/reference/array/functions/array-shift.xml:1.8 Mon Jun 16 08:03:39
2003
+++ phpdoc/en/reference/array/functions/array-shift.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-shift">
<refnamediv>
@@ -30,8 +30,8 @@
<programlisting role="php">
<![CDATA[
<?php
-$stack = array ("orange", "banana", "apple", "raspberry");
-$fruit = array_shift ($stack);
+$stack = array("orange", "banana", "apple", "raspberry");
+$fruit = array_shift($stack);
print_r($stack);
?>
]]>
Index: phpdoc/en/reference/array/functions/array-slice.xml
diff -u phpdoc/en/reference/array/functions/array-slice.xml:1.6
phpdoc/en/reference/array/functions/array-slice.xml:1.7
--- phpdoc/en/reference/array/functions/array-slice.xml:1.6 Fri Jul 25 12:38:56
2003
+++ phpdoc/en/reference/array/functions/array-slice.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-slice">
<refnamediv>
@@ -50,10 +50,10 @@
<?php
$input = array ("a", "b", "c", "d", "e");
-$output = array_slice ($input, 2); // returns "c", "d", and "e"
-$output = array_slice ($input, 2, -1); // returns "c", "d"
-$output = array_slice ($input, -2, 1); // returns "d"
-$output = array_slice ($input, 0, 3); // returns "a", "b", and "c"
+$output = array_slice($input, 2); // returns "c", "d", and "e"
+$output = array_slice($input, 2, -1); // returns "c", "d"
+$output = array_slice($input, -2, 1); // returns "d"
+$output = array_slice($input, 0, 3); // returns "a", "b", and "c"
?>
]]>
</programlisting>
Index: phpdoc/en/reference/array/functions/array-splice.xml
diff -u phpdoc/en/reference/array/functions/array-splice.xml:1.8
phpdoc/en/reference/array/functions/array-splice.xml:1.9
--- phpdoc/en/reference/array/functions/array-splice.xml:1.8 Tue Jul 15 03:01:58
2003
+++ phpdoc/en/reference/array/functions/array-splice.xml Sun Aug 17 08:21:03
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.14 -->
<refentry id="function.array-splice">
<refnamediv>
@@ -118,26 +118,26 @@
<programlisting role="php">
<![CDATA[
<?php
-$input = array ("red", "green", "blue", "yellow");
-array_splice ($input, 2);
-// $input is now array ("red", "green")
+$input = array("red", "green", "blue", "yellow");
+array_splice($input, 2);
+// $input is now array("red", "green")
-$input = array ("red", "green", "blue", "yellow");
-array_splice ($input, 1, -1);
-// $input is now array ("red", "yellow")
+$input = array("red", "green", "blue", "yellow");
+array_splice($input, 1, -1);
+// $input is now array("red", "yellow")
-$input = array ("red", "green", "blue", "yellow");
-array_splice ($input, 1, count($input), "orange");
-// $input is now array ("red", "orange")
+$input = array("red", "green", "blue", "yellow");
+array_splice($input, 1, count($input), "orange");
+// $input is now array("red", "orange")
-$input = array ("red", "green", "blue", "yellow");
-array_splice ($input, -1, 1, array("black", "maroon"));
-// $input is now array ("red", "green",
+$input = array("red", "green", "blue", "yellow");
+array_splice($input, -1, 1, array("black", "maroon"));
+// $input is now array("red", "green",
// "blue", "black", "maroon")
-$input = array ("red", "green", "blue", "yellow");
-array_splice ($input, 3, 0, "purple");
-// $input is now array ("red", "green",
+$input = array("red", "green", "blue", "yellow");
+array_splice($input, 3, 0, "purple");
+// $input is now array("red", "green",
// "blue", "purple", "yellow");
?>
]]>
Index: phpdoc/en/reference/array/functions/array-unique.xml
diff -u phpdoc/en/reference/array/functions/array-unique.xml:1.11
phpdoc/en/reference/array/functions/array-unique.xml:1.12
--- phpdoc/en/reference/array/functions/array-unique.xml:1.11 Mon Jun 16 08:03:39
2003
+++ phpdoc/en/reference/array/functions/array-unique.xml Sun Aug 17 08:21:03
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.11 $ -->
+<!-- $Revision: 1.12 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-unique">
<refnamediv>
@@ -40,8 +40,8 @@
<programlisting role="php">
<![CDATA[
<?php
-$input = array ("a" => "green", "red", "b" => "green", "blue", "red");
-$result = array_unique ($input);
+$input = array("a" => "green", "red", "b" => "green", "blue", "red");
+$result = array_unique($input);
print_r($result);
?>
]]>
@@ -67,8 +67,8 @@
<programlisting role="php">
<![CDATA[
<?php
-$input = array (4,"4","3",4,3,"3");
-$result = array_unique ($input);
+$input = array(4,"4","3",4,3,"3");
+$result = array_unique($input);
var_dump($result);
?>
]]>
Index: phpdoc/en/reference/array/functions/array-unshift.xml
diff -u phpdoc/en/reference/array/functions/array-unshift.xml:1.7
phpdoc/en/reference/array/functions/array-unshift.xml:1.8
--- phpdoc/en/reference/array/functions/array-unshift.xml:1.7 Mon Jun 16 08:03:39
2003
+++ phpdoc/en/reference/array/functions/array-unshift.xml Sun Aug 17 08:21:03
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-unshift">
<refnamediv>
@@ -35,8 +35,8 @@
<programlisting role="php">
<![CDATA[
<?php
-$queue = array ("orange", "banana");
-array_unshift ($queue, "apple", "raspberry");
+$queue = array("orange", "banana");
+array_unshift($queue, "apple", "raspberry");
?>
]]>
</programlisting>
Index: phpdoc/en/reference/array/functions/array-values.xml
diff -u phpdoc/en/reference/array/functions/array-values.xml:1.7
phpdoc/en/reference/array/functions/array-values.xml:1.8
--- phpdoc/en/reference/array/functions/array-values.xml:1.7 Mon Jun 16 08:03:39
2003
+++ phpdoc/en/reference/array/functions/array-values.xml Sun Aug 17 08:21:03
2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-values">
<refnamediv>
@@ -23,7 +23,7 @@
<programlisting role="php">
<![CDATA[
<?php
-$array = array ("size" => "XL", "color" => "gold");
+$array = array("size" => "XL", "color" => "gold");
print_r(array_values ($array));
?>
]]>
Index: phpdoc/en/reference/array/functions/array-walk.xml
diff -u phpdoc/en/reference/array/functions/array-walk.xml:1.11
phpdoc/en/reference/array/functions/array-walk.xml:1.12
--- phpdoc/en/reference/array/functions/array-walk.xml:1.11 Mon Jun 16 08:03:39
2003
+++ phpdoc/en/reference/array/functions/array-walk.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.11 $ -->
+<!-- $Revision: 1.12 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.array-walk">
<refnamediv>
@@ -75,23 +75,23 @@
<programlisting role="php">
<![CDATA[
<?php
-$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
+$fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple");
-function test_alter (&$item1, $key, $prefix) {
+function test_alter(&$item1, $key, $prefix) {
$item1 = "$prefix: $item1";
}
-function test_print ($item2, $key) {
+function test_print($item2, $key) {
echo "$key. $item2<br>\n";
}
echo "Before ...:\n";
-array_walk ($fruits, 'test_print');
+array_walk($fruits, 'test_print');
-array_walk ($fruits, 'test_alter', 'fruit');
+array_walk($fruits, 'test_alter', 'fruit');
echo "... and after:\n";
-array_walk ($fruits, 'test_print');
+array_walk($fruits, 'test_print');
?>
]]>
</programlisting>
Index: phpdoc/en/reference/array/functions/array.xml
diff -u phpdoc/en/reference/array/functions/array.xml:1.10
phpdoc/en/reference/array/functions/array.xml:1.11
--- phpdoc/en/reference/array/functions/array.xml:1.10 Mon Jun 16 08:03:39 2003
+++ phpdoc/en/reference/array/functions/array.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.110 -->
<refentry id="function.array">
<refnamediv>
@@ -47,9 +47,9 @@
<![CDATA[
<?php
$fruits = array (
- "fruits" => array ("a"=>"orange", "b"=>"banana", "c"=>"apple"),
- "numbers" => array (1, 2, 3, 4, 5, 6),
- "holes" => array ("first", 5 => "second", "third")
+ "fruits" => array("a" => "orange", "b" => "banana", "c" => "apple"),
+ "numbers" => array(1, 2, 3, 4, 5, 6),
+ "holes" => array("first", 5 => "second", "third")
)
?>
]]>
@@ -62,7 +62,7 @@
<programlisting role="php">
<![CDATA[
<?php
-$array = array( 1, 1, 1, 1, 1, 8=>1, 4=>1, 19, 3=>13);
+$array = array(1, 1, 1, 1, 1, 8 => 1, 4 => 1, 19, 3 => 13);
print_r($array);
?>
]]>
@@ -98,7 +98,7 @@
<programlisting role="php">
<![CDATA[
<?php
-$firstquarter = array(1 => 'January', 'February', 'March');
+$firstquarter = array(1 => 'January', 'February', 'March');
print_r($firstquarter);
?>
]]>
Index: phpdoc/en/reference/array/functions/arsort.xml
diff -u phpdoc/en/reference/array/functions/arsort.xml:1.6
phpdoc/en/reference/array/functions/arsort.xml:1.7
--- phpdoc/en/reference/array/functions/arsort.xml:1.6 Mon Jun 16 08:03:39 2003
+++ phpdoc/en/reference/array/functions/arsort.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.arsort">
<refnamediv>
@@ -26,10 +26,10 @@
<programlisting role="php">
<![CDATA[
<?php
-$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
-arsort ($fruits);
-reset ($fruits);
-while (list ($key, $val) = each ($fruits)) {
+$fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple");
+arsort($fruits);
+reset($fruits);
+while (list($key, $val) = each($fruits)) {
echo "$key = $val\n";
}
?>
Index: phpdoc/en/reference/array/functions/asort.xml
diff -u phpdoc/en/reference/array/functions/asort.xml:1.6
phpdoc/en/reference/array/functions/asort.xml:1.7
--- phpdoc/en/reference/array/functions/asort.xml:1.6 Mon Jun 16 08:03:39 2003
+++ phpdoc/en/reference/array/functions/asort.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.asort">
<refnamediv>
@@ -24,10 +24,10 @@
<programlisting role="php">
<![CDATA[
<?php
-$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
-asort ($fruits);
-reset ($fruits);
-while (list ($key, $val) = each ($fruits)) {
+$fruits = array("d" => "lemon", "a" => "orange", "b" => "banana", "c" => "apple");
+asort($fruits);
+reset($fruits);
+while (list($key, $val) = each($fruits)) {
echo "$key = $val\n";
}
?>
Index: phpdoc/en/reference/array/functions/compact.xml
diff -u phpdoc/en/reference/array/functions/compact.xml:1.6
phpdoc/en/reference/array/functions/compact.xml:1.7
--- phpdoc/en/reference/array/functions/compact.xml:1.6 Mon Jun 16 08:03:39 2003
+++ phpdoc/en/reference/array/functions/compact.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.compact">
<refnamediv>
@@ -39,13 +39,13 @@
<programlisting role="php">
<![CDATA[
<?php
-$city = "San Francisco";
+$city = "San Francisco";
$state = "CA";
$event = "SIGGRAPH";
-$location_vars = array ("city", "state");
+$location_vars = array("city", "state");
-$result = compact ("event", "nothing_here", $location_vars);
+$result = compact("event", "nothing_here", $location_vars);
?>
]]>
</programlisting>
Index: phpdoc/en/reference/array/functions/count.xml
diff -u phpdoc/en/reference/array/functions/count.xml:1.8
phpdoc/en/reference/array/functions/count.xml:1.9
--- phpdoc/en/reference/array/functions/count.xml:1.8 Sun Jul 20 12:59:16 2003
+++ phpdoc/en/reference/array/functions/count.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.count">
<refnamediv>
@@ -59,13 +59,13 @@
$a[0] = 1;
$a[1] = 3;
$a[2] = 5;
-$result = count ($a);
+$result = count($a);
// $result == 3
-$b[0] = 7;
-$b[5] = 9;
+$b[0] = 7;
+$b[5] = 9;
$b[10] = 11;
-$result = count ($b);
+$result = count($b);
// $result == 3;
?>
]]>
@@ -80,8 +80,8 @@
<programlisting role="php">
<![CDATA[
<?php
-$food = array( 'fruits' => array('orange', 'banana', 'apple'),
- 'veggie' => array('carrot', 'collard','pea'));
+$food = array('fruits' => array('orange', 'banana', 'apple'),
+ 'veggie' => array('carrot', 'collard','pea'));
// recursive count
echo count($food,COUNT_RECURSIVE); // output 8
Index: phpdoc/en/reference/array/functions/each.xml
diff -u phpdoc/en/reference/array/functions/each.xml:1.11
phpdoc/en/reference/array/functions/each.xml:1.12
--- phpdoc/en/reference/array/functions/each.xml:1.11 Sat Jun 21 23:09:45 2003
+++ phpdoc/en/reference/array/functions/each.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.11 $ -->
+<!-- $Revision: 1.12 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.each">
<refnamediv>
@@ -37,8 +37,8 @@
<programlisting role="php">
<![CDATA[
<?php
-$foo = array ("bob", "fred", "jussi", "jouni", "egon", "marliese");
-$bar = each ($foo);
+$foo = array("bob", "fred", "jussi", "jouni", "egon", "marliese");
+$bar = each($foo);
print_r($bar);
?>
]]>
@@ -65,8 +65,8 @@
<programlisting role="php">
<![CDATA[
<?php
-$foo = array ("Robert" => "Bob", "Seppo" => "Sepi");
-$bar = each ($foo);
+$foo = array("Robert" => "Bob", "Seppo" => "Sepi");
+$bar = each($foo);
print_r($bar);
?>
]]>
@@ -99,8 +99,8 @@
<?php
$fruit = array('a' => 'apple', 'b' => 'banana', 'c' => 'cranberry');
-reset ($fruit);
-while (list ($key, $val) = each ($fruit)) {
+reset($fruit);
+while (list($key, $val) = each($fruit)) {
echo "$key => $val\n";
}
Index: phpdoc/en/reference/array/functions/end.xml
diff -u phpdoc/en/reference/array/functions/end.xml:1.6
phpdoc/en/reference/array/functions/end.xml:1.7
--- phpdoc/en/reference/array/functions/end.xml:1.6 Fri Jul 18 04:31:09 2003
+++ phpdoc/en/reference/array/functions/end.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.end">
<refnamediv>
@@ -26,7 +26,7 @@
<![CDATA[
<?php
- $fruits = array('apple','banana','cranberry');
+ $fruits = array('apple', 'banana', 'cranberry');
print end($fruits); // cranberry
Index: phpdoc/en/reference/array/functions/extract.xml
diff -u phpdoc/en/reference/array/functions/extract.xml:1.10
phpdoc/en/reference/array/functions/extract.xml:1.11
--- phpdoc/en/reference/array/functions/extract.xml:1.10 Sat Aug 16 14:59:10
2003
+++ phpdoc/en/reference/array/functions/extract.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.extract">
<refnamediv>
@@ -163,10 +163,10 @@
wddx_deserialize */
$size = "large";
-$var_array = array ("color" => "blue",
- "size" => "medium",
- "shape" => "sphere");
-extract ($var_array, EXTR_PREFIX_SAME, "wddx");
+$var_array = array("color" => "blue",
+ "size" => "medium",
+ "shape" => "sphere");
+extract($var_array, EXTR_PREFIX_SAME, "wddx");
print "$color, $size, $shape, $wddx_size\n";
Index: phpdoc/en/reference/array/functions/in-array.xml
diff -u phpdoc/en/reference/array/functions/in-array.xml:1.9
phpdoc/en/reference/array/functions/in-array.xml:1.10
--- phpdoc/en/reference/array/functions/in-array.xml:1.9 Fri Jul 25 12:38:56
2003
+++ phpdoc/en/reference/array/functions/in-array.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.9 $ -->
+<!-- $Revision: 1.10 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.56 -->
<refentry id="function.in-array">
<refnamediv>
@@ -43,11 +43,11 @@
<programlisting role="php">
<![CDATA[
<?php
-$os = array ("Mac", "NT", "Irix", "Linux");
-if (in_array ("Irix", $os)) {
+$os = array("Mac", "NT", "Irix", "Linux");
+if (in_array("Irix", $os)) {
print "Got Irix";
}
-if (in_array ("mac", $os)) {
+if (in_array("mac", $os)) {
print "Got mac";
}
?>
@@ -100,11 +100,11 @@
<?php
$a = array(array('p', 'h'), array('p', 'r'), 'o');
-if (in_array(array ('p', 'h'), $a)) {
+if (in_array(array('p', 'h'), $a)) {
echo "'ph' was found\n";
}
-if (in_array(array ('f', 'i'), $a)) {
+if (in_array(array('f', 'i'), $a)) {
echo "'fi' was found\n";
}
Index: phpdoc/en/reference/array/functions/key.xml
diff -u phpdoc/en/reference/array/functions/key.xml:1.5
phpdoc/en/reference/array/functions/key.xml:1.6
--- phpdoc/en/reference/array/functions/key.xml:1.5 Sat Aug 16 11:33:22 2003
+++ phpdoc/en/reference/array/functions/key.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.5 $ -->
+<!-- $Revision: 1.6 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.key">
<refnamediv>
@@ -22,13 +22,12 @@
<programlisting role="php">
<![CDATA[
<?php
-$array = array (
- 'fruit1' => 'apple',
- 'fruit2' => 'orange',
- 'fruit3' => 'grape',
- 'fruit4' => 'apple',
- 'fruit5' => 'apple'
-);
+$array = array(
+ 'fruit1' => 'apple',
+ 'fruit2' => 'orange',
+ 'fruit3' => 'grape',
+ 'fruit4' => 'apple',
+ 'fruit5' => 'apple');
// this cycle echoes all associative array
// key where value equals "apple"
Index: phpdoc/en/reference/array/functions/krsort.xml
diff -u phpdoc/en/reference/array/functions/krsort.xml:1.6
phpdoc/en/reference/array/functions/krsort.xml:1.7
--- phpdoc/en/reference/array/functions/krsort.xml:1.6 Mon Jun 16 08:03:39 2003
+++ phpdoc/en/reference/array/functions/krsort.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.krsort">
<refnamediv>
@@ -23,10 +23,10 @@
<programlisting role="php">
<![CDATA[
<?php
-$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
-krsort ($fruits);
-reset ($fruits);
-while (list ($key, $val) = each ($fruits)) {
+$fruits = array("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
+krsort($fruits);
+reset($fruits);
+while (list($key, $val) = each($fruits)) {
echo "$key = $val\n";
}
?>
Index: phpdoc/en/reference/array/functions/ksort.xml
diff -u phpdoc/en/reference/array/functions/ksort.xml:1.6
phpdoc/en/reference/array/functions/ksort.xml:1.7
--- phpdoc/en/reference/array/functions/ksort.xml:1.6 Sun Jun 29 03:43:05 2003
+++ phpdoc/en/reference/array/functions/ksort.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.ksort">
<refnamediv>
@@ -23,10 +23,10 @@
<programlisting role="php">
<![CDATA[
<?php
-$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
-ksort ($fruits);
-reset ($fruits);
-while (list ($key, $val) = each ($fruits)) {
+$fruits = array("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
+ksort($fruits);
+reset($fruits);
+while (list($key, $val) = each($fruits)) {
echo "$key = $val\n";
}
?>
Index: phpdoc/en/reference/array/functions/list.xml
diff -u phpdoc/en/reference/array/functions/list.xml:1.8
phpdoc/en/reference/array/functions/list.xml:1.9
--- phpdoc/en/reference/array/functions/list.xml:1.8 Mon Jun 16 08:03:39 2003
+++ phpdoc/en/reference/array/functions/list.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.8 $ -->
+<!-- $Revision: 1.9 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.list">
<refnamediv>
@@ -64,12 +64,12 @@
<?php
-$result = mysql_query ("SELECT id, name, salary FROM employees",$conn);
-while (list ($id, $name, $salary) = mysql_fetch_row ($result)) {
- print (" <tr>\n".
- " <td><a href=\"info.php?id=$id\">$name</a></td>\n".
- " <td>$salary</td>\n".
- " </tr>\n");
+$result = mysql_query("SELECT id, name, salary FROM employees",$conn);
+while (list($id, $name, $salary) = mysql_fetch_row($result)) {
+ print(" <tr>\n" .
+ " <td><a href=\"info.php?id=$id\">$name</a></td>\n" .
+ " <td>$salary</td>\n" .
+ " </tr>\n");
}
?>
Index: phpdoc/en/reference/array/functions/natsort.xml
diff -u phpdoc/en/reference/array/functions/natsort.xml:1.7
phpdoc/en/reference/array/functions/natsort.xml:1.8
--- phpdoc/en/reference/array/functions/natsort.xml:1.7 Mon Jun 16 08:03:39 2003
+++ phpdoc/en/reference/array/functions/natsort.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.25 -->
<refentry id="function.natsort">
<refnamediv>
@@ -27,7 +27,7 @@
<programlisting role="php">
<![CDATA[
<?php
-$array1 = $array2 = array ("img12.png", "img10.png", "img2.png", "img1.png");
+$array1 = $array2 = array("img12.png", "img10.png", "img2.png", "img1.png");
sort($array1);
echo "Standard sorting\n";
Index: phpdoc/en/reference/array/functions/range.xml
diff -u phpdoc/en/reference/array/functions/range.xml:1.10
phpdoc/en/reference/array/functions/range.xml:1.11
--- phpdoc/en/reference/array/functions/range.xml:1.10 Fri Jul 25 12:38:56 2003
+++ phpdoc/en/reference/array/functions/range.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.10 $ -->
+<!-- $Revision: 1.11 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.range">
<refnamediv>
@@ -39,23 +39,23 @@
<programlisting role="php">
<![CDATA[
<?php
-// array(0,1,2,3,4,5,6,7,8,9,10,11,12)
+// array(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 ,11, 12)
foreach(range(0, 12) as $number) {
echo $number;
}
// The step parameter was introduced in 5.0.0
-// array(0,10,20,30,40,50,60,70,80,90,100)
+// array(0, 10, 20, 30, 40, 50, 60, 70, 80, 90, 100)
foreach(range(0, 100, 10) as $number) {
echo $number;
}
// Use of character sequences introduced in 4.1.0
-// array('a','b','c','d','e','f','g','h','i');
+// array('a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i');
foreach(range('a', 'i') as $letter) {
echo $letter;
}
-// array('c','b','a');
+// array('c', 'b', 'a');
foreach(range('c', 'a') as $letter) {
echo $letter;
}
Index: phpdoc/en/reference/array/functions/rsort.xml
diff -u phpdoc/en/reference/array/functions/rsort.xml:1.6
phpdoc/en/reference/array/functions/rsort.xml:1.7
--- phpdoc/en/reference/array/functions/rsort.xml:1.6 Mon Jun 16 08:03:39 2003
+++ phpdoc/en/reference/array/functions/rsort.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.rsort">
<refnamediv>
@@ -22,10 +22,10 @@
<programlisting role="php">
<![CDATA[
<?php
-$fruits = array ("lemon", "orange", "banana", "apple");
-rsort ($fruits);
-reset ($fruits);
-while (list ($key, $val) = each ($fruits)) {
+$fruits = array("lemon", "orange", "banana", "apple");
+rsort($fruits);
+reset($fruits);
+while (list($key, $val) = each($fruits)) {
echo "$key = $val\n";
}
?>
Index: phpdoc/en/reference/array/functions/shuffle.xml
diff -u phpdoc/en/reference/array/functions/shuffle.xml:1.6
phpdoc/en/reference/array/functions/shuffle.xml:1.7
--- phpdoc/en/reference/array/functions/shuffle.xml:1.6 Fri May 30 15:48:38 2003
+++ phpdoc/en/reference/array/functions/shuffle.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.shuffle">
<refnamediv>
@@ -21,10 +21,10 @@
<programlisting role="php">
<![CDATA[
<?php
-$numbers = range (1,20);
-srand ((float)microtime()*1000000);
-shuffle ($numbers);
-while (list (, $number) = each ($numbers)) {
+$numbers = range(1,20);
+srand((float)microtime()*1000000);
+shuffle($numbers);
+while (list(, $number) = each($numbers)) {
echo "$number ";
}
?>
Index: phpdoc/en/reference/array/functions/sort.xml
diff -u phpdoc/en/reference/array/functions/sort.xml:1.6
phpdoc/en/reference/array/functions/sort.xml:1.7
--- phpdoc/en/reference/array/functions/sort.xml:1.6 Mon Jun 16 08:03:39 2003
+++ phpdoc/en/reference/array/functions/sort.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.6 $ -->
+<!-- $Revision: 1.7 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.sort">
<refnamediv>
@@ -24,10 +24,10 @@
<![CDATA[
<?php
-$fruits = array ("lemon", "orange", "banana", "apple");
-sort ($fruits);
-reset ($fruits);
-while (list ($key, $val) = each ($fruits)) {
+$fruits = array("lemon", "orange", "banana", "apple");
+sort($fruits);
+reset($fruits);
+while (list($key, $val) = each($fruits)) {
echo "fruits[".$key."] = ".$val."\n";
}
Index: phpdoc/en/reference/array/functions/uksort.xml
diff -u phpdoc/en/reference/array/functions/uksort.xml:1.7
phpdoc/en/reference/array/functions/uksort.xml:1.8
--- phpdoc/en/reference/array/functions/uksort.xml:1.7 Mon Jun 16 08:03:39 2003
+++ phpdoc/en/reference/array/functions/uksort.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.7 $ -->
+<!-- $Revision: 1.8 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.uksort">
<refnamediv>
@@ -27,16 +27,18 @@
<programlisting role="php">
<![CDATA[
<?php
-function cmp ($a, $b) {
- if ($a == $b) return 0;
+function cmp($a, $b) {
+ if ($a == $b) {
+ return 0;
+ }
return ($a > $b) ? -1 : 1;
}
-$a = array (4 => "four", 3 => "three", 20 => "twenty", 10 => "ten");
+$a = array(4 => "four", 3 => "three", 20 => "twenty", 10 => "ten");
-uksort ($a, "cmp");
+uksort($a, "cmp");
-while (list ($key, $value) = each ($a)) {
+while (list($key, $value) = each($a)) {
echo "$key: $value\n";
}
?>
Index: phpdoc/en/reference/array/functions/usort.xml
diff -u phpdoc/en/reference/array/functions/usort.xml:1.12
phpdoc/en/reference/array/functions/usort.xml:1.13
--- phpdoc/en/reference/array/functions/usort.xml:1.12 Sun Aug 17 02:15:41 2003
+++ phpdoc/en/reference/array/functions/usort.xml Sun Aug 17 08:21:03 2003
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="iso-8859-1"?>
-<!-- $Revision: 1.12 $ -->
+<!-- $Revision: 1.13 $ -->
<!-- splitted from ./en/functions/array.xml, last change in rev 1.2 -->
<refentry id="function.usort">
<refnamediv>
@@ -43,16 +43,18 @@
<programlisting role="php">
<![CDATA[
<?php
-function cmp ($a, $b) {
- if ($a == $b) return 0;
+function cmp($a, $b) {
+ if ($a == $b) {
+ return 0;
+ }
return ($a < $b) ? -1 : 1;
}
-$a = array (3, 2, 5, 6, 1);
+$a = array(3, 2, 5, 6, 1);
-usort ($a, "cmp");
+usort($a, "cmp");
-while (list ($key, $value) = each ($a)) {
+while (list($key, $value) = each($a)) {
echo "$key: $value\n";
}
?>
@@ -96,7 +98,7 @@
usort($fruits, "cmp");
-while (list ($key, $value) = each ($fruits)) {
+while (list($key, $value) = each($fruits)) {
echo "\$fruits[$key]: " . $value["fruit"] . "\n";
}
?>
@@ -140,7 +142,9 @@
{
$al = strtolower($a->name);
$bl = strtolower($b->name);
- if ($al == $bl) return 0;
+ if ($al == $bl) {
+ return 0;
+ }
return ($al > $bl) ? +1 : -1;
}
}
@@ -149,10 +153,10 @@
$a[] = new TestObj("b");
$a[] = new TestObj("d");
-usort($a, array ("TestObj", "cmp_obj"));
+usort($a, array("TestObj", "cmp_obj"));
foreach ($a as $item) {
- print $item->name."\n";
+ print $item->name . "\n";
}
?>
]]>
--
PHP Documentation Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php