PHP Dokumentation: Function array-product
12. Januar 2010 von werner
array_product
(PHP 5 >= 5.1.0)
array_product — Ermittelt das Produkt von Werten in einem Array
Beschreibung
array_product() gibt das Produkt von Werten in einem Array.
Parameter-Liste
- array
Das Array.
Rückgabewerte
Gibt das Produkt als Integer oder Float zurück.
Beispiele
Beispiel #1 array_product() Beispiel
<?php$a
= array(2, 4, 6, 8);
echo "Produkt(a) = " . array_product($a) . "\n";?>Das oben gezeigte Beispiel erzeugt folgendeAusgabe:
Produkt(a) = 384