didou Wed Dec 3 06:24:19 2003 EDT
Modified files:
/phpdoc/en/reference/array/functions array-diff.xml
Log:
using screen to dislpay the correct output
# a user note was complaining about the statement being wrong (array ("blue") !=
array(1 => "blue"))
Index: phpdoc/en/reference/array/functions/array-diff.xml
diff -u phpdoc/en/reference/array/functions/array-diff.xml:1.10
phpdoc/en/reference/array/functions/array-diff.xml:1.11
--- phpdoc/en/reference/array/functions/array-diff.xml:1.10 Sun Aug 17 08:21:03
2003
+++ phpdoc/en/reference/array/functions/array-diff.xml Wed Dec 3 06:24:18 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.14 -->
<refentry id="function.array-diff">
<refnamediv>
@@ -29,16 +29,25 @@
$array1 = array("a" => "green", "red", "blue", "red");
$array2 = array("b" => "green", "yellow", "red");
$result = array_diff($array1, $array2);
+
+print_r($result);
?>
]]>
</programlisting>
+ <para>
+ Multiple occurrences in $array1 are all treated the same way.
+ This will output :
+ </para>
+ <screen>
+<![CDATA[
+Array
+(
+ [1] => blue
+)
+]]>
+ </screen>
</example>
</para>
- <para>
- This makes <varname>$result</varname> have
- <literal>array ("blue");</literal>. Multiple occurrences in
- $array1 are all treated the same way.
- </para>
<note>
<simpara>
Two elements are considered equal if and only if