PHP  
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: Mon, 16 Jul 2012

array_product

(no version information, might be only in CVS)

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 as an integer or float.

例子 1. array_product() examples

<?php

$a
= array(2, 4, 6, 8);
echo
"product(a) = " . array_product($a) . "\n";

?>

上例将输出:

product(a) = 384




<array_poparray_push>
 Last updated: Mon, 16 Jul 2012
 
Copyright © 2001-2005 The PHP Group
All rights reserved.
This unofficial mirror is operated at: http://manual.phpv.net/
Last updated: Thu Jul 7 19:13:47 2005 CST