⊗ppPmMFAr 147 of 447 menu

Mathematical Operations on Arrays in PHP

array_sum array_product

Given an array:

<?php $arr = [1, 2, 3, 4, 5]; ?>

Find the sum of the elements of this array.

Given an array:

<?php $arr = [1, 2, 3, 4, 5]; ?>

Find the product (multiplication) of the elements of this array.

Given an array:

<?php $arr = [1, 2, 3, 4, 5]; ?>

Using the functions array_sum and count, find the arithmetic mean of the elements (sum of elements divided by their count) of this array.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline