Berechnen Sie das Produkt von Arrays und geben Sie es zurück:
<?php$a=array(5,5);echo(array_product($a));?>Die Funktion array_product() berechnet das Produkt von Arrays und gibt es zurück.
array_product( array )
| Parameter | beschreiben |
|---|---|
| Array | Erforderlich. Gibt ein Array an. |
| Rückgabewert: | Gibt ein Produkt aus Ganzzahlen oder Gleitkommazahlen zurück. |
|---|---|
| PHP-Version: | 5.1.0+ |
| Update-Protokoll: | Ab PHP 5.3.6 ist das Produkt leerer Arrays 1. Vor PHP 5.3.6 war das Produkt leerer Arrays 0. |
Berechnen Sie das Produkt von Arrays und geben Sie es zurück:
<?php$a=array(5,5,2,10);echo(array_product($a));?>