> PHP Functions with Return values ~ Online tutorial

PHP Functions with Return values

PHP Functions - Return values
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

Please Give Us Your 1 Minute In Sharing This Post!
Please Give Us Your 1 Minute In Sharing This Post!
SOCIALIZE IT →
FOLLOW US →
SHARE IT →
Powered By: BloggerYard.Com

0 comments: