0

Can sombody help me?

I dindt understand the return in a function!

21st May 2017, 3:36 PM
B. Huber
B. Huber - avatar
2 Answers
+ 1
if you make a function like this example : -------------------------------------------------------------------------------- <?php function sum($num1, $num2) { $res = $num1 + $num2; return $res; } echo sum(8, 3); ?> -------------------------------------------------------------------------------- when you calls the function .. the program wants to return or to give you the value of tge variable $res not any other variable .. function sum = $res (i hope i could help you)
21st May 2017, 4:08 PM
Michael Ehab Mikhail
Michael Ehab Mikhail - avatar
0
Thank you very mutch!!!
21st May 2017, 4:16 PM
B. Huber
B. Huber - avatar