Unix and Linux Discussions Tagged with array |
|
Thread / Thread Starter |
Last Post |
Replies |
Views |
Forum |
|
|
|
5 |
5,159 |
Shell Programming and Scripting |
|
|
|
11 |
3,288 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
3,292 |
Shell Programming and Scripting |
|
|
|
4 |
6,686 |
Shell Programming and Scripting |
|
|
|
6 |
1,440 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
1,015 |
UNIX for Beginners Questions & Answers |
|
|
|
15 |
13,277 |
Shell Programming and Scripting |
|
|
|
3 |
14,324 |
Shell Programming and Scripting |
|
|
|
8 |
1,643 |
UNIX for Beginners Questions & Answers |
|
|
|
8 |
2,407 |
Shell Programming and Scripting |
|
|
|
4 |
1,528 |
UNIX for Beginners Questions & Answers |
|
|
|
4 |
1,613 |
UNIX for Beginners Questions & Answers |
|
|
|
11 |
3,440 |
UNIX for Beginners Questions & Answers |
|
|
|
21 |
2,980 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
1,505 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
1,821 |
UNIX for Beginners Questions & Answers |
|
|
|
3 |
1,958 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
673 |
UNIX for Beginners Questions & Answers |
|
|
|
5 |
5,885 |
Shell Programming and Scripting |
|
|
|
6 |
3,966 |
Shell Programming and Scripting |
|
|
|
3 |
14,153 |
AIX |
|
|
|
3 |
2,031 |
UNIX for Beginners Questions & Answers |
|
|
|
8 |
914 |
UNIX for Beginners Questions & Answers |
|
|
|
10 |
4,259 |
Shell Programming and Scripting |
|
|
|
3 |
1,654 |
UNIX for Beginners Questions & Answers |
|
|
|
2 |
13,704 |
AIX |
|
|
|
6 |
10,114 |
Homework & Coursework Questions |
|
|
|
3 |
4,320 |
Shell Programming and Scripting |
|
|
|
3 |
606 |
UNIX for Beginners Questions & Answers |
|
|
|
8 |
1,412 |
Shell Programming and Scripting |
|
|
|
29 |
1,923 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
1,244 |
UNIX for Beginners Questions & Answers |
|
|
|
1 |
1,036 |
Shell Programming and Scripting |
|
|
|
12 |
1,317 |
Shell Programming and Scripting |
|
|
|
2 |
643 |
Shell Programming and Scripting |
|
|
|
17 |
1,291 |
UNIX for Beginners Questions & Answers |
|
|
|
6 |
3,428 |
What is on Your Mind? |
|
|
|
6 |
997 |
Shell Programming and Scripting |
|
|
|
8 |
2,776 |
Shell Programming and Scripting |
|
|
|
9 |
933 |
Shell Programming and Scripting |
ARRAY_PRODUCT(3) 1 ARRAY_PRODUCT(3)
array_product - Calculate the product of values in an array
SYNOPSIS
number array_product (array $array)
DESCRIPTION
array_product(3) returns the product of values in an array.
PARAMETERS
o $array
- The array.
RETURN VALUES
Returns the product as an integer or float.
CHANGELOG
+--------+---------------------------------------------------+
|Version | |
| | |
| | Description |
| | |
+--------+---------------------------------------------------+
| 5.3.6 | |
| | |
| | The product of an empty array is now 1, when |
| | before this function would return 0 for an empty |
| | array. |
| | |
+--------+---------------------------------------------------+
EXAMPLES
Example #1
array_product(3) examples
<?php
$a = array(2, 4, 6, 8);
echo "product(a) = " . array_product($a) . "
";
echo "product(array()) = " . array_product(array()) . "
";
?>
The above example will output:
product(a) = 384
product(array()) = 1
PHP Documentation Group ARRAY_PRODUCT(3)