Functions in PHP
Functions are used to group a set of statements that perform a specific task. A function can be called multiple times throughout the code.
Example:
bash
function sum($x, $y){
$result = $x + $y;
return $result;
}
$total = sum(5, 3);
echo $total;
No comments:
Post a Comment