Date: 09/08/00
- Next message: Egon Schmid: "[PHP-DOC] cvs: phpdoc /de chapters.ent /de/functions errorfunc.xml funchand.xml info.xml misc.xml var.xml"
- Previous message: Jesus M. Castagnetto: "[PHP-DOC] cvs: phpdoc /en/functions array.xml"
- Next in thread: Egon Schmid: "[PHP-DOC] cvs: phpdoc /en/functions array.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
jmcastagnetto Fri Sep 8 12:34:56 2000 EDT
Modified files:
/phpdoc/en/functions array.xml
Log:
Fixed typo in the code I just modified, and also did a search and replace
of all the => and -> to use the > entity instead.
Index: phpdoc/en/functions/array.xml
diff -u phpdoc/en/functions/array.xml:1.36 phpdoc/en/functions/array.xml:1.37
--- phpdoc/en/functions/array.xml:1.36 Fri Sep 8 12:27:11 2000
+++ phpdoc/en/functions/array.xml Fri Sep 8 12:34:56 2000
@@ -53,9 +53,9 @@
<title><function>Array</function> example</title>
<programlisting role="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")
);
</programlisting>
</example>
@@ -89,7 +89,7 @@
<title><function>Array_count_values</function> example</title>
<programlisting role="php">
$array = array (1, "hello", 1, "world", "hello");
-array_count_values ($array); // returns array (1=>2, "hello"=>2, "world"=>1)
+array_count_values ($array); // returns array (1=>2, "hello"=>2, "world"=>1)
</programlisting>
</example>
</para>
@@ -123,8 +123,8 @@
<example>
<title><function>Array_diff</function> example</title>
<programlisting role="php">
-$array1 = array ("a" => "green", "red", "blue");
-$array2 = array ("b" => "green", "yellow", "red");
+$array1 = array ("a" => "green", "red", "blue");
+$array2 = array ("b" => "green", "yellow", "red");
$result = array_diff ($array1, $array2);
</programlisting>
</example>
@@ -194,15 +194,15 @@
<example>
<title><function>Array_intersect</function> example</title>
<programlisting role="php">
-$array1 = array ("a" => "green", "red", "blue");
-$array2 = array ("b" => "green", "yellow", "red");
+$array1 = array ("a" => "green", "red", "blue");
+$array2 = array ("b" => "green", "yellow", "red");
$result = array_intersect ($array1, $array2);
</programlisting>
</example>
</para>
<para>
This makes <varname>$result</varname> have <literal>array ("a"
- => "green", "red");</literal>
+ => "green", "red");</literal>
</para>
<para>
See also <function>array_diff</function>.
@@ -241,7 +241,7 @@
<example>
<title><function>Array_keys</function> example</title>
<programlisting role="php">
-$array = array (0 => 100, "color" => "red");
+$array = array (0 => 100, "color" => "red");
array_keys ($array); // returns array (0, "color")
$array = array ("blue", "red", "green", "blue", "blue");
@@ -262,7 +262,7 @@
function array_keys($arr, $term="") {
$t = array();
while (list($k,$v) = each($arr)) {
- if ($term && $k != $term)
+ if ($term && $v != $term)
continue;
$t[] = $k;
}
@@ -310,15 +310,15 @@
<example>
<title><function>array_merge</function> example</title>
<programlisting role="php">
-$array1 = array ("color" => "red", 2, 4);
-$array2 = array ("a", "b", "color" => "green", "shape" => "trapezoid", 4);
+$array1 = array ("color" => "red", 2, 4);
+$array2 = array ("a", "b", "color" => "green", "shape" => "trapezoid", 4);
array_merge ($array1, $array2);
</programlisting>
</example>
</para>
<para>
- Resulting array will be <literal>array("color" => "green", 2, 4,
- "a", "b", "shape" => "trapezoid", 4)</literal>.
+ Resulting array will be <literal>array("color" => "green", 2, 4,
+ "a", "b", "shape" => "trapezoid", 4)</literal>.
</para>
<para>
See also <function>array_merge_recursive</function>.
@@ -360,15 +360,15 @@
<example>
<title><function>Array_merge_recursive</function> example</title>
<programlisting role="php">
-$ar1 = array ("color" => array ("favorite" => "red"), 5);
-$ar2 = array (10, "color" => array ("favorite" => "green", "blue"));
+$ar1 = array ("color" => array ("favorite" => "red"), 5);
+$ar2 = array (10, "color" => array ("favorite" => "green", "blue"));
$result = array_merge_recursive ($ar1, $ar2);
</programlisting>
</example>
</para>
<para>
- Resulting array will be <literal>array ("color" => array
- ("favorite" => array ("red", "green"), "blue"), 5, 10)</literal>.
+ Resulting array will be <literal>array ("color" => array
+ ("favorite" => array ("red", "green"), "blue"), 5, 10)</literal>.
</para>
<para>
See also <function>array_merge</function>.
@@ -937,13 +937,13 @@
<example>
<title><function>Array_unique</function> example</title>
<programlisting role="php">
-$input = array ("a" => "green", "red", "b" => "green", "blue", "red");
+$input = array ("a" => "green", "red", "b" => "green", "blue", "red");
$result = array_unique ($input);
</programlisting>
</example>
</para>
<para>
- This makes <varname>$result</varname> have <literal>array ("a" =>
+ This makes <varname>$result</varname> have <literal>array ("a" =>
"green", "red", "blue");</literal>.
</para>
</refsect1>
@@ -1022,7 +1022,7 @@
<example>
<title><function>Array_values</function> example</title>
<programlisting role="php">
-$array = array ("size" => "XL", "color" => "gold");
+$array = array ("size" => "XL", "color" => "gold");
array_values ($array); // returns array ("XL", "gold")
</programlisting>
</example>
@@ -1108,7 +1108,7 @@
<example>
<title><function>Array_walk</function> example</title>
<programlisting role="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) {
$item1 = "$prefix: $item1";
@@ -1158,7 +1158,7 @@
<example>
<title><function>Arsort</function> example</title>
<programlisting role="php">
-$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
+$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
arsort ($fruits);
reset ($fruits);
while (list ($key, $val) = each ($fruits)) {
@@ -1218,7 +1218,7 @@
<example>
<title><function>Asort</function> example</title>
<programlisting role="php">
-$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
+$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
asort ($fruits);
reset ($fruits);
while (list ($key, $val) = each ($fruits)) {
@@ -1303,7 +1303,7 @@
</programlisting>
<para>
After this, <varname>$result</varname> will be <literal>array ("event"
- => "SIGGRAPH", "city" => "San Francisco", "state" => "CA")</literal>.
+ => "SIGGRAPH", "city" => "San Francisco", "state" => "CA")</literal>.
</para>
</example>
</para>
@@ -1437,13 +1437,13 @@
<varname>$bar</varname> now contains the following key/value
pairs:
<itemizedlist spacing="compact">
- <listitem><simpara>0 => 0</simpara></listitem>
- <listitem><simpara>1 => 'bob'</simpara></listitem>
- <listitem><simpara>key => 0</simpara></listitem>
- <listitem><simpara>value => 'bob'</simpara></listitem>
+ <listitem><simpara>0 => 0</simpara></listitem>
+ <listitem><simpara>1 => 'bob'</simpara></listitem>
+ <listitem><simpara>key => 0</simpara></listitem>
+ <listitem><simpara>value => 'bob'</simpara></listitem>
</itemizedlist>
<programlisting role="php">
-$foo = array ("Robert" => "Bob", "Seppo" => "Sepi");
+$foo = array ("Robert" => "Bob", "Seppo" => "Sepi");
$bar = each ($foo);
</programlisting>
</para>
@@ -1451,10 +1451,10 @@
<varname>$bar</varname> now contains the following key/value
pairs:
<itemizedlist spacing="compact">
- <listitem><simpara>0 => 'Robert'</simpara></listitem>
- <listitem><simpara>1 => 'Bob'</simpara></listitem>
- <listitem><simpara>key => 'Robert'</simpara></listitem>
- <listitem><simpara>value => 'Bob'</simpara></listitem>
+ <listitem><simpara>0 => 'Robert'</simpara></listitem>
+ <listitem><simpara>1 => 'Bob'</simpara></listitem>
+ <listitem><simpara>key => 'Robert'</simpara></listitem>
+ <listitem><simpara>value => 'Bob'</simpara></listitem>
</itemizedlist>
</para>
</example>
@@ -1472,7 +1472,7 @@
echo "Values submitted via POST method:<br>";
reset ($HTTP_POST_VARS);
while (list ($key, $val) = each ($HTTP_POST_VARS)) {
- echo "$key => $val<br>";
+ echo "$key => $val<br>";
}
</programlisting>
</example>
@@ -1617,9 +1617,9 @@
wddx_deserialize */
$size = "large";
-$var_array = array ("color" => "blue",
- "size" => "medium",
- "shape" => "sphere");
+$var_array = array ("color" => "blue",
+ "size" => "medium",
+ "shape" => "sphere");
extract ($var_array, EXTR_PREFIX_SAME, "wddx");
print "$color, $size, $shape, $wddx_size\n";
@@ -1725,11 +1725,11 @@
<example>
<title><function>Krsort</function> example</title>
<programlisting role="php">
-$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
+$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
krsort ($fruits);
reset ($fruits);
while (list ($key, $val) = each ($fruits)) {
- echo "$key -> $val\n";
+ echo "$key -> $val\n";
}
</programlisting>
</example>
@@ -1782,11 +1782,11 @@
<example>
<title><function>Ksort</function> example</title>
<programlisting role="php">
-$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
+$fruits = array ("d"=>"lemon", "a"=>"orange", "b"=>"banana", "c"=>"apple");
ksort ($fruits);
reset ($fruits);
while (list ($key, $val) = each ($fruits)) {
- echo "$key -> $val\n";
+ echo "$key -> $val\n";
}
</programlisting>
</example>
@@ -1914,19 +1914,19 @@
Standard sorting
Array
(
- [0] => img1.png
- [1] => img10.png
- [2] => img12.png
- [3] => img2.png
+ [0] => img1.png
+ [1] => img10.png
+ [2] => img12.png
+ [3] => img2.png
)
Natural order sorting
Array
(
- [3] => img1.png
- [2] => img2.png
- [1] => img10.png
- [0] => img12.png
+ [3] => img1.png
+ [2] => img2.png
+ [1] => img10.png
+ [0] => img12.png
)
</programlisting>
</informalexample>
@@ -2172,7 +2172,7 @@
rsort ($fruits);
reset ($fruits);
while (list ($key, $val) = each ($fruits)) {
- echo "$key -> $val\n";
+ echo "$key -> $val\n";
}
</programlisting>
</example>
@@ -2412,7 +2412,7 @@
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");
- Next message: Egon Schmid: "[PHP-DOC] cvs: phpdoc /de chapters.ent /de/functions errorfunc.xml funchand.xml info.xml misc.xml var.xml"
- Previous message: Jesus M. Castagnetto: "[PHP-DOC] cvs: phpdoc /en/functions array.xml"
- Next in thread: Egon Schmid: "[PHP-DOC] cvs: phpdoc /en/functions array.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

