<?php function addNumbers($a, $b) { $sum = $a + $b; return $sum; } // Calling the function and storing the result in a variable $result = addNumbers(5, 3); // Displaying the result echo "The sum is: $result"; ?>
<?php function addNumbers($a, $b) { $sum = $a + $b; return $sum; } // Calling the function and storing the result in a variable $result = addNumbers(5, 3); // Displaying the result echo "The sum is: $result"; ?>