PHP array_product() 函数
PHP 教程
· 2019-01-22 11:41:44
实例
计算并返回数组的乘积:
<?php
$a=array(5,5);
echo(array_product($a));
?>
$a=array(5,5);
echo(array_product($a));
?>
定义和用法
array_product() 函数计算并返回数组的乘积。
语法
array_product(array)
| 参数 | 描述 |
|---|---|
| array | 必需。规定数组。 |
技术细节
| 返回值: | 返回一个整数或者浮点数的乘积。 |
|---|---|
| PHP 版本: | 5.1.0+ |
| 更新日志: | 自 PHP 5.3.6 起,空数组的乘积为 1。在 PHP 5.3.6 之前,空数组的乘积为 0。 |
更多实例
实例 1
计算并返回数组的乘积:
<?php
$a=array(5,5,2,10);
echo(array_product($a));
?>
$a=array(5,5,2,10);
echo(array_product($a));
?>
点击查看所有 PHP 教程 文章: https://codercto.com/courses/l/5.html
Web Scalability for Startup Engineers
Artur Ejsmont / McGraw / 2015-6-23 / USD 34.81
Design and build scalable web applications quickly This is an invaluable roadmap for meeting the rapid demand to deliver scalable applications in a startup environment. With a focus on core concept......一起来看看 《Web Scalability for Startup Engineers》 这本书的介绍吧!
Base64 编码/解码
Base64 编码/解码
URL 编码/解码
URL 编码/解码