downloads | documentation | faq | getting help | mailing lists | reporting bugs | php.net sites | links | my php.net 
search for in the  

<array_poparray_push>
Last updated: Thu, 26 Jun 2008

array_product

(PHP 5 >= 5.1.0)

array_product — Calculate the product of values in an array

Description

number array_product ( array $array )

array_product() returns the product of values in an array.

Parameters

array

The array.

Return Values

Returns the product as an integer or float.

Examples

Example #1 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



add a noteadd a note User Contributed Notes
Calculate the product of values in an array
There are no user contributed notes for this page.




<array_poparray_push>
Last updated: Thu, 26 Jun 2008
show source | credits | sitemap | contact | advertising | mirror sites
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://phpbuilder.com/
Last updated: Tue Nov 1 20:20:59 2005 EST
Columns / Articles | Tips / Quickies | News | News Linking and RSS Feeds | Shared Code Library
Mail Archives | Support / Discussion Forums | Get Started! Links | Contribute! | Docs