#52. PHP Array_Sum & Array_Product
How to work PHP Array_Sum.?
<?php
//------Array Sum Function
//$a = array(12,23,434,22,42);
// Associative Array function
//$a = array("a" => 1.2,"b" => 32.2,"c" => 1.34 );
// echo "sum = " . array_sum($a);
<?
How to work PHP Array_Product.?
Run Code:
<?php
//-----Array Product Function----
$a = array(12,23,434,22,42);
echo "Product = " . array_product($a);


Comments
Post a Comment