downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

array_push> <array_pop
[edit] Last updated: Fri, 30 Nov 2012

view this page in

array_product

(PHP 5 >= 5.1.0)

array_productCalculate the product of values in an array

Opis

number array_product ( array $array )

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

Parametry

array

The array.

Zwracane wartości

Returns the product as an integer or float.

Przykłady

Przykład #1 array_product() examples

<?php

$a 
= array(2468);
echo 
"product(a) = " array_product($a) . "\n";
echo 
"product(array()) = " array_product(array()) . "\n";

?>

Powyższy przykład wyświetli:

product(a) = 384
product(array()) = 1



array_push> <array_pop
[edit] Last updated: Fri, 30 Nov 2012
 
add a note add a note User Contributed Notes array_product - [10 notes]