⊗ppPmUFSP 194 of 447 menu

Multiple Function Parameters in PHP

A function can accept not one parameter, but several. In this case, they need to be listed separated by commas. Let's for example create a function that accepts two numbers as parameters and displays their sum on the screen:

<?php function func($num1, $num2) { echo $num1 + $num2; } func(1, 2); // outputs 3 ?>

Create a function that accepts 3 numbers as parameters and displays the sum of these numbers on the screen.

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