Definition:
The array_product() function calculates and returns the product of an array.
The basic syntax of the array_product()
function is given with:
array_product(array);
The array_product()
function accepts the following parameters.
Parameter | Description |
---|---|
array | Required. Specifies the array to work on. |
Example1: Below example calculate and return the product of array
Output : 3360
Example2:If any value in the array cannot be evaluated to a number, this function returns the integer 0.
Output : 0