Answer the question
In order to leave comments, you need to log in
How to display the sum of global variables?
How to write a function that will display the sum of global numbers.
my code is like this but not working
$a = 5;
$b = 10;
function summa(){
$summan = $GLOBALS['a'] + $GLOBALS['b'];
return $summan;
}
summa();
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question