jmcastagnetto Wed Mar 7 02:39:01 2001 EDT
Modified files:
/phpdoc/en/functions array.xml
Log:
Added documentation for array_sum
Index: phpdoc/en/functions/array.xml
diff -u phpdoc/en/functions/array.xml:1.58 phpdoc/en/functions/array.xml:1.59
--- phpdoc/en/functions/array.xml:1.58 Tue Feb 20 06:23:56 2001
+++ phpdoc/en/functions/array.xml Wed Mar 7 02:39:01 2001
@@ -988,6 +988,42 @@
</para>
</refsect1>
</refentry>
+
+ <refentry id="function.array-sum">
+ <refnamediv>
+ <refname>array_sum</refname>
+ <refpurpose>
+ Calculate the sum of values in an array.
+ </refpurpose>
+ </refnamediv>
+ <refsect1>
+ <title>Description</title>
+ <funcsynopsis>
+ <funcprototype>
+ <funcdef>mixed <function>array_sum</function></funcdef>
+ <paramdef>array <parameter>arr</parameter></paramdef>
+ </funcprototype>
+ </funcsynopsis>
+ <para>
+ <function>Array_sum</function> returns the sum of values
+ in an array as an integer or float.
+ </para>
+ <para>
+ <example>
+ <title><function>Array_sum</function> examples</title>
+ <programlisting role="php">
+$a = array(2,4,6,8);
+echo "sum(a) = ".array_sum($a)."\n";
+// prints: sum(a) = 20
+
+$b = array("a"=>1.2,"b"=>2.3,"c"=>3.4);
+echo "sum(b) = ".array_sum($b)."\n";
+// prints: sum(b) = 6.9
+ </programlisting>
+ </example>
+ </para>
+ </refsect1>
+ </refentry>
<refentry id="function.array-unique">
<refnamediv>