1
0
mirror of https://github.com/php/doc-de.git synced 2026-03-25 07:42:18 +01:00
Files
archived-doc-de/reference/array/functions/array-sum.xml
Thomas Schoefbeck bcdc9299c3 sync to en
git-svn-id: https://svn.php.net/repository/phpdoc/de/trunk@133570 c90b9560-bf6c-de11-be94-00142212c4b1
2003-06-29 07:44:02 +00:00

76 lines
1.8 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.5 $ -->
<!-- EN-Revision: 1.7 Maintainer: tom Status: ready -->
<refentry id="function.array-sum">
<refnamediv>
<refname>array_sum</refname>
<refpurpose>
Liefert die Summe der Werte in einem Array
</refpurpose>
</refnamediv>
<refsect1>
<title>Beschreibung</title>
<methodsynopsis>
<type>mixed</type><methodname>array_sum</methodname>
<methodparam><type>array</type><parameter>array</parameter></methodparam>
</methodsynopsis>
<para>
<function>array_sum</function> liefert die Summe der Werte eines
Arrays als Integer oder Float.
</para>
<para>
<example>
<title><function>array_sum</function></title>
<programlisting role="php">
<![CDATA[
<?php
$a = array(2, 4, 6, 8);
echo "sum(a) = ".array_sum($a)."\n";
$b = array("a"=>1.2,"b"=>2.3,"c"=>3.4);
echo "sum(b) = ".array_sum($b)."\n";
?>
]]>
</programlisting>
<para>
Obiges Programm wird folgendes ausgeben:
</para>
<screen role="php">
<![CDATA[
sum(a) = 20
sum(b) = 6.9
]]>
</screen>
</example>
</para>
<note>
<para>
PHP Versionen vor 4.2.1 haben das übergebene Array selbst
modifiziert, und Strings in Zahlen konvertiert (welche
abhängig von deren Wert meist zu null konvertiert wurden).
</para>
</note>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->