JavaScript Editor Javascript debugger      Website design 

array_product

Calculate the product of values in an array (PHP 5 >= 5.1.0)
number array_product ( array array )

array_product() returns the product of values in an array as an integer or float.

Example 270. array_product() examples

<?php

$a
= array(2, 4, 6, 8);
echo
"product(a) = " . array_product($a) . "\n";

?>

The above example will output:

product(a) = 384