PHP Functions - Return values
Functions can also be used to return values.
Example
The output of the code above will be:
1 + 16 = 17
Functions can also be used to return values.
Example
<html> <body> <?php function add($x,$y) { $total = $x + $y; return $total; } echo "1 + 16 = " . add(1,16) ?> <body> </html> |
The output of the code above will be:
1 + 16 = 17
0 comments:
Post a Comment