Computer Science, asked by issacjohnston2004, 1 month ago

Write the Syntax to define Function in PHP.​

Answers

Answered by Diya817
1

php // add function with 2 arguments function add($a, $b) { $sum = $a + $b; // returning the result return $sum; } // overloaded add function with 3 arguments function add($a, $b, $c) { $sum = $a + $b + $c; // returning the result return $sum; } // calling add with 2 arguments echo "5 + 10 = " . add(5, 10) .

Answered by rbs31502016
1

Answer:

php // add function with 2 arguments function add($a, $b) { $sum = $a + $b; // returning the result return $sum; } // overloaded add function with 3 arguments function add($a, $b, $c) { $sum = $a + $b + $c; // returning the result return $sum; } // calling add with 2 arguments echo "5 + 10 = " . add(5, 10) .

Explanation:

i hope you understand better

Similar questions