PHP - Function array_product()


Advertisements


Syntax

array_product ( $array );

Definition and Usage

It returns the product of values in an array as an integer or float.

Parameters

Sr.No Parameter & Description
1

array(Required)

It specifies an array.

Return Values

It returns product of values in an array.

Example

Try out following example −

<?php
   $input = array(5,6,3);
   
   print_r(array_product($input));
?> 

This will produce the following result −

90

php_function_reference.htm

Advertisements