PHP array_product() function

PHP array_pop() function
PHP array_push() function

The array_product function calculates and returns the product of the values of the array.

What is the syntax of the array_product function in PHP?

array_product(array)
ParameterDescription
arraySpecify the array to calculate the product of – Required
array_product function in PHP

Example of array_product function

<?php
$arr=array(9,2,4,6);
echo(array_product($arr));
?>

The above example returns the product of the values of the array 9*2*4*6.

PHP array_pop() function
PHP array_push() function

Stay up-to-date about PHP!

We don’t spam!

en English
X
Scroll to Top