The array_product() function calculates the product of an array.
PHP array_product() Function has the following syntax.
array_product(array)
Calculate and return the product of an array:
<?php//w w w . ja v a2 s . c om
$a=array(5,5);
print_r($a);
echo(array_product($a));
echo "\n";
$a=array(5,5,2,10);
print_r($a);
echo(array_product($a));
?>
The code above generates the following result.